Preserving Blanks in Parameters to Shell Script

Preserving Blanks in Parameters to Shell Script

Aharon Schkolnik aschkolnik at gmail.com
Mon Jun 14 15:27:43 IDT 2010


Hi.

I want to write a script which will nice ffmpeg whatever parameters it is 
given - ie:

#!/bin/sh

nice ffmpeg $*

#


However, what if I have a file named `file one'


I would like to type `myscript -i file\ one output.whatever` 

I do not want to change what I type - the script needs to be a drop-in 
replacement for the ffmpeg command.


Is there any way to do make the script preserve the backslashed space ?

TIA


-- 
  The day is short, and the work is great,    |  Aharon Schkolnik
  and the laborers are lazy, and the reward   |  
  is great, and the Master of the house is    |  aschkolnik at gmail.com
  impatient. - Ethics Of The Fathers Ch. 2    |  054 3344135



More information about the Linux-il mailing list