Post Reply 
Linux/Bash help - redirection
Author Message
ZiNgA BuRgA
Smart Alternative

Posts: 17,024.1882
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1887
Offline
Post: #5
RE: Linux/Bash help - redirection
I think the > operator immediately truncates the file before cat can even open the file for reading.
I'd imagine that if cat would open the file for reading first, the line would actually work, due to how Linux handles reads and writes to a file at the same time.

Using the >> operator instead does work as expected, though this isn't what you want.
18/01/2013 08:26 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Linux/Bash help - redirection - whjms - 18/01/2013, 06:10 AM
RE: Linux/Bash help - redirection - Joom - 18/01/2013, 08:13 AM
RE: Linux/Bash help - redirection - whjms - 18/01/2013, 12:28 PM
RE: Linux/Bash help - redirection - ZiNgA BuRgA - 18/01/2013 08:26 PM
RE: Linux/Bash help - redirection - lembas - 18/01/2013, 09:49 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: