Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #56483 > unrolled thread
| Started by | Fritz Wuehler <fritz@spamexpire-202405.rodent.frell.theremailer.net> |
|---|---|
| First post | 2024-05-31 01:03 +0200 |
| Last post | 2024-05-31 01:03 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.os.linux.misc
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: How many ways can you run a script? Fritz Wuehler <fritz@spamexpire-202405.rodent.frell.theremailer.net> - 2024-05-31 01:03 +0200
| From | Fritz Wuehler <fritz@spamexpire-202405.rodent.frell.theremailer.net> |
|---|---|
| Date | 2024-05-31 01:03 +0200 |
| Subject | Re: How many ways can you run a script? |
| Message-ID | <a1020b644fce5f73a67a3d4b81fdfbd0@msgid.frell.theremailer.net> |
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
unix can be fun. The more you play with it, the more you like it...
Back to top | Article view | comp.os.linux.misc
csiph-web