1
vote
1answer
129 views

Having trouble piping output of dscl -list to -dscl read using xargs

I'm trying to get every user using dscl and reading each of their records using xargs and dscl. I'm not sure what I'm doing wrong, though, because I would expect this command to take each line of ...
2
votes
1answer
956 views

How to redirect multiple bash commands to a variable AND screen?

I would like to capture a subshell's output in a variable and print it in the terminal screen simultaneously. Is it possible to do this by assigning the subshell to a variable and piping stdout and ...
1
vote
1answer
91 views

Why Does Issuing One lsof Launches Two Processes?

I'm on current OS X 10.7. Sometimes I want to check which application locks a certain file. I do that by lsof | grep $FILENAME I noticed that running this command invokes two instances of lsof. Why ...
1
vote
1answer
498 views

How to pipe output of tail -F on OS X?

I've recently moved from Ubuntu to OS X and I'm finding that the 'tail' command behaves differently. On Ubuntu I could run tail -f xyzzy.log | espeak (To have the computer read me what's happening ...
1
vote
2answers
1k views

Split a large .gz file and gzip each of split file?

I have a large text.gz file (2GB) and I want to split it by line. I tried to use: zcat text.gz | split -l1000000 However this generated a huge file (around 92GB before I terminated it) and put too ...
1
vote
1answer
562 views

grep -v -A not working properly (actually not working at all)

I have to filter lines like the following: [javac] /Users/looris/Sviluppo/android/projects/toutry/src/net/looris/toutry/Stuff.java:23: warning: unmappable character for encoding ascii [javac] ...