Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
Running Windows on your Mac
linux tcsh interactive and argv
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="newdaddy" data-source="post: 594625" data-attributes="member: 38765"><p>/Users/crose1 > alias oneCol "`tr ' ' '\012' < $1 > $2`"</p><p>tcsh: Missing name for redirect.</p><p>/Users/crose1 > alias oneCol "`tr ' ' '\012' < \$1 > \$2`"</p><p>/Users/crose1 > oneCol test1 test1.out </p><p>tcsh: test1: Permission denied.</p><p>/Users/crose1 > which oneCol</p><p>oneCol: aliased to </p><p>/Users/crose1 > alias oneCol "tr ' ' '\012' < $1 > $2"</p><p>/Users/crose1 > oneCol test1 test1.out</p><p>tcsh: Missing name for redirect.</p><p>/Users/crose1 > alias oneCol</p><p>tr ' ' '\012' < > </p><p>/Users/crose1 > alias oneCol "tr ' ' '\012' < \$1 > \$2"</p><p>/Users/crose1 > oneCol test1 test1.out</p><p>tcsh: : No such file or directory.</p><p>/Users/crose1 > alias oneCol</p><p>tr ' ' '\012' < \ > \</p><p>/Users/crose1 > alias oneCol `tr ' ' '\012' < $1 $2`</p><p>tcsh: $1: Ambiguous.</p><p>/Users/crose1 > alias oneCol `tr ' ' '\012' < \$1 \$2`</p><p>tcsh: $1: No such file or directory.</p><p></p><p>OK, I give up. Instead, I just put this in my bin directory, instead, as a file named oneCol (and then gave it execute permission, and did a rehash).</p><p></p><p>!#/bin/sh</p><p>tr ' ' '\012' < $1 > $2</p><p></p><p>This command isn't such a great example, because it's a command you might otherwise want to pipe to something else (but because of the argv redirection, you can't). There are other commands which are much more appropriate for this, and for each of those, I'll just move them each to their own file in my local bin dir. </p><p></p><p>Thanks rman for trying to help me out - I appreciate it.</p></blockquote><p></p>
[QUOTE="newdaddy, post: 594625, member: 38765"] /Users/crose1 > alias oneCol "`tr ' ' '\012' < $1 > $2`" tcsh: Missing name for redirect. /Users/crose1 > alias oneCol "`tr ' ' '\012' < \$1 > \$2`" /Users/crose1 > oneCol test1 test1.out tcsh: test1: Permission denied. /Users/crose1 > which oneCol oneCol: aliased to /Users/crose1 > alias oneCol "tr ' ' '\012' < $1 > $2" /Users/crose1 > oneCol test1 test1.out tcsh: Missing name for redirect. /Users/crose1 > alias oneCol tr ' ' '\012' < > /Users/crose1 > alias oneCol "tr ' ' '\012' < \$1 > \$2" /Users/crose1 > oneCol test1 test1.out tcsh: : No such file or directory. /Users/crose1 > alias oneCol tr ' ' '\012' < \ > \ /Users/crose1 > alias oneCol `tr ' ' '\012' < $1 $2` tcsh: $1: Ambiguous. /Users/crose1 > alias oneCol `tr ' ' '\012' < \$1 \$2` tcsh: $1: No such file or directory. OK, I give up. Instead, I just put this in my bin directory, instead, as a file named oneCol (and then gave it execute permission, and did a rehash). !#/bin/sh tr ' ' '\012' < $1 > $2 This command isn't such a great example, because it's a command you might otherwise want to pipe to something else (but because of the argv redirection, you can't). There are other commands which are much more appropriate for this, and for each of those, I'll just move them each to their own file in my local bin dir. Thanks rman for trying to help me out - I appreciate it. [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
Running Windows on your Mac
linux tcsh interactive and argv
Top