bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: the "-e" command line argument is not recognized


From: Viktor Korsun
Subject: Re: the "-e" command line argument is not recognized
Date: Wed, 16 Feb 2022 22:14:26 +1300

Thank you guys!

Regards,
Viktor Korsun, bitekas@gmail.com


On Wed, 16 Feb 2022 at 22:09, Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
wrote:

>
>
> 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."
>>
>>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]