08-21-2008
It's the expected behaviour: you need to pass to cat multiple filenames as arguments without the shell redirection (as far as I know only Z-Shell with the multios option set can handle multiple arguments with redirection).
The same for output redirection - you can do it with Z-Shell, otherwise you should use the tee command.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I tried to cat a file to another user that was logged in, but I received an error message that displayed something like:
%cat funny > /dev/ttyp3
zsh: permission denied: /dev/ttyp3
Thank you all for your help (1 Reply)
Discussion started by: zorro
1 Replies
2. UNIX for Dummies Questions & Answers
Hi
Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX?
Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies
3. Shell Programming and Scripting
cat myname.txt
John Doe I
John Doe II
John Doe III
-----------------------------------------------------------------------
for i in `cat myname.txt`
do
echo This is my name: $i >> thi.is.my.name.txt
done
-----------------------------------------------------------------------
cat... (1 Reply)
Discussion started by: danimad
1 Replies
4. Shell Programming and Scripting
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies
5. UNIX for Dummies Questions & Answers
Hi Guys,
I m new to UNIX and new to this forum. Was wondering if someone can help me understand redirection (standard input output pipeline etc)
for starters, not too sure what this would mean
who | sort > sortedfile | pr | lp
im starting to understand common commands but when throwing... (2 Replies)
Discussion started by: jmack123
2 Replies
6. Shell Programming and Scripting
Hello everyone,I'm reading a book and there's code fragment:
exec 3>&1
ls -l 2>&1 >&3 3>&- | grep bad 3>&-
exec 3>&-
It says that the red part of that code does not close fd 3 but the green does close the fd 3.I can't understand that.....Why?Any predicate will be appreciated.:) (18 Replies)
Discussion started by: homeboy
18 Replies
7. Shell Programming and Scripting
Hello All,
I am using the below script to gather various tools running by the user, we have more than 100 tools running on the server so my challenge is to redirect memory & cpu load to the file with the name of the tool.so am using the below script i am stucking how to redirect to the file... (2 Replies)
Discussion started by: ajaincv
2 Replies
8. UNIX for Dummies Questions & Answers
explain the redirections 1>, 2>, 3>, .....
and 1< ,2<,3<.....
where we use these things
thanks
Thread moved from AIX forum (2 Replies)
Discussion started by: tsurendra
2 Replies
9. Shell Programming and Scripting
I have not been able to append the contents of many files into one file. I have executed the CAT command shown below separately substituting an actual path and file name for the array variable to verify that I have the syntax correct. The bottom line - nothing is happening with CAT. I am running... (16 Replies)
Discussion started by: demmith
16 Replies