Hi,
It sure works, and I tried it myself. the pipe operator | takes the
output of the certain command and Input it to the other command.
When saying ls > file1.txt, this will create a list of folders inside
the file1.txt
cat file1.txt will list the contents of file1.txt and take the output to
file2.txt
Regards,..
TheOldWiseKing
Geoffrey wrote:
TheOldWiseKing wrote:
S A
I found a good solution, here is the command:
ls > file1.txt | cat file1.txt > file2.txt
Not so wise OldWiseKing. :)
I don't know what the pipe is for, but I don't think that will work.
file2.txt will likely end up empty.
Maybe you meant:
ls > file1.txt; cat file1.txt > file2.txt
What you really want as someone else mentioned is a tee as in:
ls |tee file1.txt > file2.txt
It's a lot cleaner and probably more efficient.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]