From: Joseph Rosevear on 1 Jan 2010 23:51 In alt.os.linux.slackware Chris F.A. Johnson <cfajohnson(a)gmail.com> wrote: > On 2010-01-01, Joseph Rosevear wrote: [snip] > > Here is a script that does the same thing, but is general purpose: > Not general enough; it will fail if $1 contains whitespace. > > ##################################### > > > > #!/bin/sh > > > > cp ~/$1 /tmp > cp ~/"$1" /tmp > Better still might be: > cp "$1" /tmp > > ##################################### Good point! I was trying to keep my example simple for the sake of the OP, although I do get a little lax in my code sometimes. I appreciate your input here. I just now went to your website. I admire your writing skill and envy your experience. I once wrote (for about one month) a folk concert review column for the Michigan Daily, but really I'm a wannabe writer. And a wannabe computer consultant. Keep up the good work! -Joe > -- > Chris F.A. Johnson, author | <http://cfajohnson.com> > Shell Scripting Recipes: | My code in this post, if any, > A Problem-Solution Approach | is released under the > 2005, Apress | GNU General Public Licence
First
|
Prev
|
Pages: 1 2 Prev: libx265 - Slacpkg anyone? Next: A note about Rob Cypher being a disgusting douchebag |