Re: Variable getopts lost

2010-02-23 Thread Mart Frauenlob
On 23.02.2010 20:55, Daniel Bunzendahl wrote: > Am Dienstag, 23. Februar 2010 20:45:31 schrieb Greg Wooledge: >> On Tue, Feb 23, 2010 at 08:30:16PM +0100, Daniel Bunzendahl wrote: >>> if [ !$LSEITE ]; then >> >> You want: if [ ! "$LSEITE" ] > > this dosn't work. > > But I earsed the if-loop. And

Re: Variable getopts lost

2010-02-23 Thread Daniel Bunzendahl
Am Dienstag, 23. Februar 2010 20:45:31 schrieb Greg Wooledge: > On Tue, Feb 23, 2010 at 08:30:16PM +0100, Daniel Bunzendahl wrote: > > if [ !$LSEITE ]; then > > You want: if [ ! "$LSEITE" ] this dosn't work. But I earsed the if-loop. And it works. (dont overwrite LSEITE) But I need this check i

Re: Variable getopts lost

2010-02-23 Thread Ken Irving
On Tue, Feb 23, 2010 at 08:30:16PM +0100, Daniel Bunzendahl wrote: > ... > if [ !$LSEITE ]; then > LSEITE=$(pdfinfo $pdf | grep Pages: | sed -e 's/Pages:[[:space:]]//g') > echo "-l automatisch auf $LSEITE gesetzt" > fi > ... > > In the last if-loop LSEITE will be set if LSEITE isn't set. > This

Re: Variable getopts lost

2010-02-23 Thread Greg Wooledge
On Tue, Feb 23, 2010 at 08:30:16PM +0100, Daniel Bunzendahl wrote: > if [ !$LSEITE ]; then You want: if [ ! "$LSEITE" ] There are probably more errors. This is just the line you mentioned in particular as not working.

Re: Variable getopts lost

2010-02-23 Thread pk
Daniel Bunzendahl wrote: > My question wasn't fokused on my wrong script. I think there is something > wrong or limited by the System... > Maybe you can give me a tip I should search for... You've got it already...either invoke the script with its name (not through bash), or use bash -- etc.

Re: Variable getopts lost

2010-02-23 Thread Daniel Bunzendahl
Am Dienstag, 23. Februar 2010 12:50:41 schrieb Pierre Gaston: > On Tue, Feb 23, 2010 at 1:14 AM, DanielBu wrote: > > Hello all, > > > > I get crazy with getopts: > > Some Times my script (500 Lines) don't take input parameters like this: > > It's really impossible to make a guess with a report as

Re: Variable getopts lost

2010-02-23 Thread Pierre Gaston
On Tue, Feb 23, 2010 at 1:14 AM, DanielBu wrote: > > Hello all, > > I get crazy with getopts: > Some Times my script (500 Lines) don't take input parameters like this: It's really impossible to make a guess with a report as vague as that.

Re: Variable getopts lost

2010-02-23 Thread Mart Frauenlob
On 23.02.2010 00:14, DanielBu wrote: > > Hello all, > > I get crazy with getopts: > Some Times my script (500 Lines) don't take input parameters like this: > > /bin/bash pdf2media.sh -f 9 -l 104 Document.pdf > > the script reads -f 9 and Documents.pdf but missing -l 104 > > It did work for a l

Variable getopts lost

2010-02-22 Thread DanielBu
no real results. Please help - I worked 3 Month for this script. Thanks a lot :-) Daniel -- View this message in context: http://old.nabble.com/Variable-getopts-lost-tp27695401p27695401.html Sent from the Gnu - Bash mailing list archive at Nabble.com.