The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-21-2008
marconi marconi is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 41
Redirection related clarifications required...

There are two files named goody and good. Please look at their single line contents:-
$ cat goody
hi m goody
$ cat good
hi m good

1)
$ cat goody < good
hi m goody

When we give cat, a file to read from, standard input is ignored.
As such, the above operation will just display contents of goody.


2)
$ cat > goody < good
$ cat goody
hi m good
$ cat good
hi m good

What will be the output of the above command ? I think the command takes input from file good and then overwrites in goody and prints on terminal screen.

3) Whats the difference between a) cat goody >>= good and b) cat goody >> good

4) Whats the difference between a) cat goody >= good and b) cat goody > good

5) Whats the difference between cat < good and cat << good


Thanks a lot in advance.

Best Regards,
Marconi.