1
vote
5answers
135 views

How to split the output into different files?

I have a input file like foo xxx yyy zzz foo xxx yyy zzz foo xxx yyy zzz foo xxx yyy zzz bar xxx yyy zzz bar xxx yyy zzz foo xxx yyy zzz .. How to split the input file by line, into foo.txt ...
0
votes
1answer
767 views

How do I copy stdout and stderr into a log file in Windows XP?

I have a script that I'm running from a command line. I want the stdout and stderr to be displayed on the screen and also to be copied into a logfile with append. What is the syntax for this ...
4
votes
4answers
143 views

Is there a *Nix tool that can be used to format command output that is too wide for the screen?

I'm running psql -U postgres template1 -c "select * from pg_stat_activity" and the output is too wide for my terminal. Is there a *nix command I can use to prevent the output from wrapping? ...
1
vote
2answers
3k views

Updating a file in a zip archive from STDIN

I want to update/freshen a file in a zip archive with the contents of stdin. So far I haven't been able to find a way to tell the zip command that the contents of stdin correspond to a particular ...
0
votes
6answers
1k views

How to run command on parts of input file

I have ~ 40GB file, and a filter command that for some reason breaks when I try to run it on the file (even when passed via pipe). But. It doesn't fail when I split input file into many small files, ...