Re: check, that a script is in a folder

2011-01-05 Thread S Mathias
solved: if ! [ "${PWD##*/}" == "ASDF" ]; then echo "error: not the ASDF dir"; exit 1; fi --- On Wed, 1/5/11, Rodolfo Alcazar Portillo wrote: > From: Rodolfo Alcazar Portillo > Subject: Re: check, that a script is in a folder > To: "Community

Re: check, that a script is in a folder

2011-01-05 Thread Rodolfo Alcazar Portillo
On Wed, 2011-01-05 at 02:28 -0800, S Mathias wrote: > $ echo ${PWD##*/} > somefolder > $ if "${PWD##*/}" -eq "asdf" > /dev/null; then echo "this is the asdf > folder"; else exit 1; fi > bash: notthatfolder: command not found... > this is the asdf folder > $ /home/rodolfoap > mkdir asdf /home/rod

Re: check, that a script is in a folder

2011-01-05 Thread Sjoerd Mullender
> > > So i just want to check that i'm in an exact folder. e.g.: "asdf" > > What's wrong with my one-liner? > > I just want to check, that a script is in a folder, and if it isn't, then it > exits > > > if [ "${PW

check, that a script is in a folder

2011-01-05 Thread S Mathias
t;asdf" What's wrong with my one-liner? I just want to check, that a script is in a folder, and if it isn't, then it exits -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailma