Re: parameter list too long
From: David Douthitt (ssrat_at_mailbag.com)
Date: 11/14/03
- Next message: Stephane CHAZELAS: "Re: parameter list too long"
- Previous message: Michael Heiming: "Re: ftp scrip"
- In reply to: Stephane CHAZELAS: "Re: parameter list too long"
- Next in thread: Stephane CHAZELAS: "Re: parameter list too long"
- Reply: Stephane CHAZELAS: "Re: parameter list too long"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 14 Nov 2003 12:40:07 -0600
On Wed, 12 Nov 2003 23:56:05 +0100, Stephane CHAZELAS
<this.address@is.invalid> wrote:
>pattern comparison in ksh is made as:
>
>if [[ "$filename" = *.xml ]]
>
>or more portably:
>
>case "$filename" in
> *.xml) ...;;
>esac
Isn't the [[ ... ]] construct portable among ksh?
>Or, to avoid running one cp per file:
>
>ls -f | sed '/\.xml$/!d;s/./\\&/g' | xargs sh -c '
> shift "$1"; exec cp -- "$@" /download' 2 1
>
>(provided that filenames don't contain NL characters).
I understood your explanation of the shift et al (sneaky!) - but
what's the reason for the
s/./\\&/g
in sed?
David Douthitt (david@douthitt.net)
UNIX System Administrator
HP-UX, Unixware, Linux
Linux+, LPIC-1
- Next message: Stephane CHAZELAS: "Re: parameter list too long"
- Previous message: Michael Heiming: "Re: ftp scrip"
- In reply to: Stephane CHAZELAS: "Re: parameter list too long"
- Next in thread: Stephane CHAZELAS: "Re: parameter list too long"
- Reply: Stephane CHAZELAS: "Re: parameter list too long"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|