458 reputation
39
bio website localhost
location San Francisco, CA
age 39
visits member for 3 years
seen Oct 13 at 20:09

Research Computing Architect at the University of California, Berkeley


Jan
30
comment How can I do a “copy if changed” operation?
-1 because this is overly-complicated, non-portable (-J is bsd-specific; with GNU xargs it is -I), and does not work correctly if the same set of files do not exist in both locations already (if I touch x/boo then grep gives me Only in ./x: boo which causes errors in the pipeline). Use a tool built for the job, like rsync --checksum.
Jan
30
comment Converting multiple image files from JPEG to PDF format
Good idea to use mogrify instead of convert. This will work for 100 files, but using globbing with *.jpg does not scale to thousands of files; that can be done by combining the command in a simple one-liner with find.
Jan
30
comment Converting multiple image files from JPEG to PDF format
Resorting to make seems a little over-complicated when a simple one-liner will do the trick.
Jan
30
awarded  Editor
Jan
30
comment Converting multiple image files from JPEG to PDF format
There is no reason to write a separate script when it can all be done on the with a simple single command line.
Jan
30
revised Converting multiple image files from JPEG to PDF format
changed png to pdf since the question specifically asked that
Jan
30
answered Converting multiple image files from JPEG to PDF format
Jan
27
comment Grep huge number of patterns from huge file
Yes, you can use /usr/bin/sqlite3 with shell scripts, however I recommend avoiding shell scripts except for simple throw-away programs and instead use a language like python which has better error handling and is easier to maintain and grow.
Jan
27
answered Grep huge number of patterns from huge file
Dec
29
awarded  Critic
Dec
6
answered How do I delete a file whose name begins with “-” (hyphen a.k.a. dash or minus)?
Dec
6
comment How do I delete a file whose name begins with “-” (hyphen a.k.a. dash or minus)?
This way has two problems: 1) do not use -exec rm when you can use -delete; 2) obtaining the inode and using that is needlessly overcomplicated when you can just use: find -name '--help' -delete
Nov
27
awarded  Autobiographer
Nov
23
awarded  Teacher
Nov
23
answered When is xargs needed?
Sep
26
awarded  Supporter