Re: Problem with bash linux
From: William Park (opengeometry_at_yahoo.ca)
Date: 10/17/03
- Next message: Gerhard W. Gruber: "Re: seek within a large file"
- Previous message: Paul Lutus: "Re: quote of the day in Linux"
- In reply to: Macigno: "Problem with bash linux"
- Next in thread: Bill Unruh: "Re: Problem with bash linux"
- Reply: Bill Unruh: "Re: Problem with bash linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 17 Oct 2003 19:48:26 GMT
Macigno <dcollina@dianoema.it> wrote:
> I need help:
> i have a shell that works properly on Unix Aix. I have to make it work
> on Linux Red Hat Server.
> My problem is:
>
> if (-f ./*.OK) then .....
>
> But the line (-f ./*.OK) doesn't work. I receive the error "?too many
> arguments". If i write (-f ./???.OK) which would be good for me) i
> receive the error "?binary operator expected".
> Thank you for your help.
Wrong syntax for Bourne shells (ie. Bash, Sh, Ash, Ksh). Also, you'll
have problem when there are more than 1 file. Try something like
if ls *.OK > /dev/null; then ...; fi
-- William Park, Open Geometry Consulting, <opengeometry@yahoo.ca> Linux solution for data management and processing.
- Next message: Gerhard W. Gruber: "Re: seek within a large file"
- Previous message: Paul Lutus: "Re: quote of the day in Linux"
- In reply to: Macigno: "Problem with bash linux"
- Next in thread: Bill Unruh: "Re: Problem with bash linux"
- Reply: Bill Unruh: "Re: Problem with bash linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|