Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Aha! | 20 comments | Create New Account
Click here to return to the 'Aha!' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Aha!
Authored by: Eponymous on Jan 20, '03 10:59:39PM
Yes, it seems to be that last little bit that does it:
> /dev/null 2>&1
I know what that first little bit does (send responses out to never-never land), but what does the second part do?

This has allowed me to run another script that I couldn't figure out how to run without the terminal.

[ Reply to This | # ]
Sends stderr to the same place as stdout
Authored by: owain_vaughan on Jan 21, '03 10:16:59AM

ie. nowhere :)



[ Reply to This | # ]
Aha!
Authored by: david-bo on Jan 23, '03 05:51:22PM

To send stdout to a file you write something like this:

ls -R > allFiles.txt

2>&1 sends stderr to the same destination as stdout (typically a terminal).



[ Reply to This | # ]