Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1868

Alias parameter passing question

$
0
0
I have an alias like this:

Code:
testalias = (cmd1 %$ | cmd2)

So when I invoke it like this:

Code:
testalias 1 2 3

Then this will be executed:

Code:
(cmd1 1 2 3 | cmd2)

But there is a problem when I redirect the output of the alias.

Code:
testalias 1 2 3 > file1

Now this will be executed:

Code:
(cmd1 1 2 3 > file1 | cmd2)

But I want this to be executed instead:

Code:
(cmd1 1 2 3 | cmd2) > file1

Are there any ways around this problem?

Basically I want to be able to...

Read more

Viewing all articles
Browse latest Browse all 1868

Trending Articles