You are not logged in.
Pages: 1
Hey there.
I'm working on some pacman script, and for that I use the following command:
`echo n | pacman -Suy >text.out`
text.out includes the data I want to have in the file. but pacman still spitts some output to the screen, which I'd like to hide.
Can you please tell me how to do so?
Thanks in advance.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
There are 2 out streams that are usually put on console:
stdout (standard output, number 1 = default)
stderr (standard error, number 2)
You can redirect them like this:
>stdout.txt 2>stderr.txt
or both to same file like this:
&>both.txt
Offline
If you want to redirect all output, then you need to handle stderr streams too.
redirecting output streams
EDIT: Aww. slow on the trigger. Oh well, teach a man to fish..
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
or 2>/dev/null will deep six the message all together....
Offline
Thanks a lot for your replies.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
i always wondered about that too but never knew how to ask!
Offline
i always wondered about that too but never knew how to ask!
Here's a good way!!:
Hey there.
I'm working on some pacman script, and for that I use the following command:
`echo n | pacman -Suy >text.out`text.out includes the data I want to have in the file. but pacman still spitts some output to the screen, which I'd like to hide.
Can you please tell me how to do so?
Thanks in advance.
8)
Dusty
Offline
smart a$$
Offline
Sorry, I've been bored... when the mods (*ahem*) get around to cleaning up the off topic posts, my count is gonna plummet again.
Dusty
Offline
Pages: 1