1
vote
1answer
155 views

Shell script detecting errors from command called by script

I am calling applications from my shell script, which performs a number of important steps in sequence, one step being below: for database in $( echo 'show databases;' | mysql ...
1
vote
1answer
161 views

How can I view the full exception thrown by a script in the shell?

When I'm running my ruby script, I'm getting an exception. However, since I'm running Ubuntu in VMware Fusion, I can't resize my terminal window so I can't see the whole excecption. How can I view ...
1
vote
2answers
598 views

File name with spaces piped to two xargs commands

I have a directory and many more subdirectories like the following - file with spaces.txt filewithsuperlonglines.txt ordinaryfile.txt binaryfile.bin The command - find . -type f -print0 | ...
7
votes
2answers
6k views

Passing two arguments to a command using pipes

Usually, we only need to pass one argument: echo abc | cat echo abc | cat some_file - echo abc | cat - some_file Is there a way to pass two arguments? Something like {echo abc , echo xyz} | cat ...
2
votes
1answer
158 views

Why doesn't “find -print0” work in Cygwin under Vista?

I'm writing a simple shell script: find datafiles/ -type f -print0 | xargs -0 md5sum > datafiles.md5 In Cygwin under Vista, it just sits there and nothing happens. It works fine on Linux. What ...