09-14-2007
newbie need help on cat
1. what do the following commands do (give logic and concise description)
a. cat 1> file-A 2> file-B 0< file-C
b. cat 2> file-B 0< file-C 1> file-A
c. cat 1> file-A 0< file-C 2>&1
d. cat 0<file-C | sort 1> file-A 2> /dev/null
e. cat 2> file-B 0< file-C | sort 1> file-A 2> /dev/null
9 More Discussions You Might Find Interesting
1. 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
2. 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
3. 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
4. UNIX for Dummies Questions & Answers
Hello everyone,
Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware.
I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies
5. Shell Programming and Scripting
Hello everyone,
I am having to do a lot of perl scripting these days and I am learning a lot.
I have this problem
I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files..
there is folder1\folder2\*.gz
and there are about 50 folders... (1 Reply)
Discussion started by: xytiz
1 Replies
6. Shell Programming and Scripting
Hi,
I am new to programming and also to perl..But i know 'perl' can come to my rescue, But I am stuck at many places and need help..any small help is much appreciated... below is the description of what i intend to acheive with my script.
I have a files named in this format... (13 Replies)
Discussion started by: xytiz
13 Replies
7. UNIX for Dummies Questions & Answers
Hi there,
I have the following problem. I have a csv file which looks like
'AGI,ABJ,Y,Y,Y,None,EQUATION,ANY,ANY,None,'
'AGI,ABJ,Y,Y,Y,None,EQUATION HEAVY,ANY,ANY,None,'
'AGI,ABJ,Y,Y,Y,None,VARIATION,ANY,ANY,None,'
but I do this
for ab in $(cat test.csv); do echo $ab; done
in the... (4 Replies)
Discussion started by: sickboy
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
When I was analyzing the code I got below line.
cat - << 'EOF' >> ${FILE PATH}
I surfed net to understand but I couldn't get what is about.
Please help me out. (2 Replies)
Discussion started by: stew
2 Replies
9. Shell Programming and Scripting
Hi,
Below is the Python Script am trying to execute:
#!/usr/bin/python
import os
import sys
import subprocess
import time
def mpg(node, sitename):
os.system('/usr/local/bin/expect /gsn/pdp/pdp_expect ' + node + ' > /tmp/' + node + '.temp')
date = os.popen("cat /tmp/" + node +... (9 Replies)
Discussion started by: infinitydon
9 Replies