| Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | About BLU |
Hi,
Quoting Steven Erat <stevenerat at yahoo.com>:
> Would someone kindly suggest the solution to passing input parameters to a
> shell script where the arguments may contain spaces?
Put quotes around it...
> [auser at localhost ~]$ cat makeLink.sh
> #!/bin/sh
> echo First arg is: $1, Second arg is $2
> /bin/ln -s $1 $2
Change this to:
/bin/ln -s "$1" "$2"
Although that will probably have problems if you have embedded quotes
in your filenames.
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available