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 : fritz (at) *nospam* spamexpire-202405.rodent.frell.theremailer.net (Fritz Wuehler)
Groupes : comp.os.linux.misc
Date : 30. May 2024, 20:33:46
Autres entêtes
Organisation : dizum.com - The Internet Problem Provider
Message-ID : <eb630d749f754ffeef2dbcf0b8ba4841@msgid.frell.theremailer.net>
References : 1
Woozy Song <suzyw...@outlook.com> [WS]:
WS> I know these are not all equivalent and may have idiosyncracies.

You forgot the most obvious ones (since this is unix we are
talkiing about):

$ [long (or short) pipe] | sh

and

$ < myscript sh



Here are a few more exotic ones:

$ find myscript -print0 | xargs -0 sh

$ echo | parallel --pipe ./myscript

$ echo "From " | reformail -s ./myscript
# Similar tricks exist for procmail, maildrop, postfix and most other MTAs

# chroot /tmp/playground /statically_compiled_shell myscript

$ sg - some_group -c ./myscript

$ < /dev/null tpipe ./myscript

$ zip test.zip myscript; funzip test.zip | sh

$ < /dev/zero dd bs=1024 count=10 >tempfile 2>&1;\
  tar -M --tape-length=1 --info-script ./myscript -cf /dev/null tempfile;\
  rm -f tempfile


Date Sujet#  Auteur
30 May 24 o Re: How many ways can you run a script?1Fritz Wuehler

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal