Re: How many ways can you run a script?

Liste des GroupesRevenir à ol misc 
Sujet : Re: How many ways can you run a script?
De : nunojsilva (at) *nospam* invalid.invalid (Nuno Silva)
Groupes : comp.os.linux.misc
Date : 02. Jun 2024, 12:48:19
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v3hilj$3ajff$1@dont-email.me>
References : 1 2 3
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
On 2024-06-02, Woozy Song wrote:

Fritz Wuehler wrote:
Woozy Song <suzyw...@outlook.com> [WS]:
WS> I know these are not all equivalent and may have idiosyncracies.
>
Idiosyncracies is shell's middle name.
Use them or lose them, as they say...
>
$ ${0/-} myscript
>
(assuming that this is a login tty and your shell is bash)
>
>
That is an obscure one! What does the /- mean?

I'm guessing it's "delete all matches of '-' in $0"?

See «'${PARAMETER/PATTERN/STRING}'» in

    info '(bash)Shell Parameter Expansion'

--
Nuno Silva

Date Sujet#  Auteur
30 May 24 * Re: How many ways can you run a script?4Fritz Wuehler
2 Jun 24 +* Re: How many ways can you run a script?2Woozy Song
2 Jun 24 i`- Re: How many ways can you run a script?1Nuno Silva
2 Jun 24 `- Re: How many ways can you run a script?1Fritz Wuehler

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal