Hi, I am passing items to a shell script that wraps a ruby script. I noticed that the file names are truncated at the first space when they are passed. I need the script to operate on files that potentially have spaces in them. I'll give an example
~/Desktop/Total Deposit Report - 2333 Sat 03-07-2009 11-20p 4.pdf becomes ~/Desktop/Total
I noticed that each space delimited token is sent as another string in an array.
Here's what I had to do in Ruby to massage these paths:
path = ARGV.join(" "); path=path.chomp; path=path.chomp('\\'); path=path.delete"\""; path=path.delete"\'"
Is there a better way?