Re: Preserving Blanks in Parameters to Shell Script

2010-06-14 Thread Tzafrir Cohen
On Mon, Jun 14, 2010 at 11:02:11PM +1000, Amos Shapira wrote: > On 14 June 2010 22:48, Aharon Schkolnik wrote: > > On Monday, June 14, 2010, Noam Meltzer wrote: > >> use $@ instead of $* > > > > Does that work for you ? > > > > I still get the same results - the script treates file\ one as two > >

Re: Preserving Blanks in Parameters to Shell Script

2010-06-14 Thread Shlomi Fish
On Monday 14 Jun 2010 15:27:43 Aharon Schkolnik wrote: > 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\

Re: Preserving Blanks in Parameters to Shell Script

2010-06-14 Thread Herouth Maoz
Quoting Noam Meltzer : use $@ instead of $* But put it in quotes: "$@". Otherwise the effect is lost. Herouth ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Re: Preserving Blanks in Parameters to Shell Script

2010-06-14 Thread Aharon Schkolnik
On Monday, June 14, 2010, Noam Meltzer wrote: > I'm sorry. I tend to forget why I hate shell scripts. > Use "$@" instead. (checked it this time, it works ;-) ) Yep - looks like nice ffmpeg "$@" does the trick. Thanks ! > > 2010/6/14 Aharon Schkolnik > > > On Monday, June 14, 2010, Noam Melt

Re: Preserving Blanks in Parameters to Shell Script

2010-06-14 Thread Noam Meltzer
I'm sorry. I tend to forget why I hate shell scripts. Use "$@" instead. (checked it this time, it works ;-) ) 2010/6/14 Aharon Schkolnik > On Monday, June 14, 2010, Noam Meltzer wrote: > > use $@ instead of $* > > Does that work for you ? > > I still get the same results - the script treates fil

Re: Preserving Blanks in Parameters to Shell Script

2010-06-14 Thread Amos Shapira
On 14 June 2010 22:48, Aharon Schkolnik wrote: > On Monday, June 14, 2010, Noam Meltzer wrote: >> use $@ instead of $* > > Does that work for you ? > > I still get the same results - the script treates file\ one as two > parameters - file and one. 1. Try switching to #!/bin/bash - I think the "$@

Re: Preserving Blanks in Parameters to Shell Script

2010-06-14 Thread Aharon Schkolnik
On Monday, June 14, 2010, Noam Meltzer wrote: > use $@ instead of $* Does that work for you ? I still get the same results - the script treates file\ one as two parameters - file and one. > > On Mon, Jun 14, 2010 at 3:27 PM, Aharon Schkolnik wrote: > > Hi. > > > > I want to write a script

Re: Preserving Blanks in Parameters to Shell Script

2010-06-14 Thread Noam Meltzer
use $@ instead of $* On Mon, Jun 14, 2010 at 3:27 PM, Aharon Schkolnik wrote: > 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

Preserving Blanks in Parameters to Shell Script

2010-06-14 Thread Aharon Schkolnik
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