Prob with cat in UNIX/Solaris 10

Status
Not open for further replies.

hellgate

Discoverer
Hi guys,

I'm having prob is understanding the following concept:

Scenario 1:
f1,f2 & f3 files r not created & i'm running the following command as root:

cat f1 > f2 > f3

after that whatever i'm typing & saving (Ctrl + Z) the content is only being saved in f3 but noot in f1 & f2.so is the content not being saved in f1 & f2.

Scenario 2:
f1,f2 & f3 r files which r already having content in then (text) and when i'm running the following command as root:

cat f1 > f2 > f3

the content of f2 is being deleted & content of f3 is being appended to with the content of f1.but why is the content of file f2 being deleted?

Plz help me understand this.

Thnx & Regards,
HellGate
 
Status
Not open for further replies.