[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the "-e" command line argument is not recognized
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: the "-e" command line argument is not recognized |
Date: |
Wed, 16 Feb 2022 10:09:47 +0100 |
On Wed, Feb 16, 2022 at 9:59 AM Andreas Schwab <schwab@linux-m68k.org>
wrote:
> On Feb 16 2022, Viktor Korsun wrote:
>
> > runme.sh
> > #!/bin/bash
> > echo $0
> > echo $1
> > echo $2
> > echo $3
> > echo $4
> > echo $5
> > echo $6
>
> Don't use echo to print unknown text. Use printf instead, which can
> handle this correctly. Also, don't forget to quote properly.
>
> printf "%s\n" "$4"
>
printf '%s args\n' $#
printf %s\\n "$@"
>
> >
> > command:
> > ./runme.sh -q -w -e -r -t -y
> >
> > produced output:
> > ./get_env.sh
> > -q
> > -w
> >
>
> $ help echo
> echo: echo [-neE] [arg ...]
> Write arguments to the standard output.
>
> Display the ARGs, separated by a single space character and followed
> by a
> newline, on the standard output.
>
> Options:
> -n do not append a newline
> -e enable interpretation of the following backslash escapes
> -E explicitly suppress interpretation of backslash escapes
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
> "And now for something completely different."
>
>