Re: shell scripts with empty arguments and spaces
From: Michael Paoli (michael1cat_at_yahoo.com)
Date: 01/22/04
- Next message: Michael Paoli: "Re: Filter files transferred using SCP"
- Previous message: Chris F.A. Johnson: "Re: batch renaming of files"
- In reply to: Ulrich Herrmann: "shell scripts with empty arguments and spaces"
- Next in thread: Stephane CHAZELAS: "Re: shell scripts with empty arguments and spaces"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 21 Jan 2004 19:19:50 -0800
A hint:
"$@" is your friend
sh(1)
Additional hints (some of which reference poster seems to already be aware of):
shift
set
set --
${parameter:+word}
${parameter+word}
parameter=
Quoting (most notably ' and ")
Ulrich Herrmann <uherr@gmx.de> wrote in message news:<opr148ql0bl16y4z@news.online.de>...
> Is
> there no way of handling empty arguments in shell scripts directly?
> Anyone to give me some tips on this?
- Next message: Michael Paoli: "Re: Filter files transferred using SCP"
- Previous message: Chris F.A. Johnson: "Re: batch renaming of files"
- In reply to: Ulrich Herrmann: "shell scripts with empty arguments and spaces"
- Next in thread: Stephane CHAZELAS: "Re: shell scripts with empty arguments and spaces"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|