!yzBwvLxciGLIBHonQe:matrix.org

bash

270 Members
Discussions about Bash shell, scripting, etc.37 Servers

Load older messages


SenderMessageTime
7 Sep 2023
@dermoth:matrix.orgdermoth changed their display name from Thomas GS to Thomas.06:12:34
@boxcarcatdog:matrix.orgboxcarcatdog joined the room.07:33:26
@dhatakult:matrix.org@dhatakult:matrix.org left the room.19:34:53
8 Sep 2023
@Fernando-Basso:matrix.orgFernando-Basso joined the room.14:38:33
@Fernando-Basso:matrix.orgFernando-BassoI am running an encrypted shell script like this: bash < <(2> /dev/null gpg -dq ./script.gpg), except this script needs a parameter. I'm failing to find a way to pass the parameter to the script in this situation.14:39:01
@Fernando-Basso:matrix.orgFernando-Basso

Maybe something like this:

$ bash -s - foo < <(cat ./args.sh)
foo
15:09:34
9 Sep 2023
@partime:matrix.org@partime:matrix.org left the room.22:08:15
11 Sep 2023
@bahman-m:matrix.orgbahmanm joined the room.09:43:02
14 Sep 2023
@dermoth:matrix.orgdermoth

Fernando-Basso: correct, I'd swap the thing around though for clarity, and with -s you may need -- as your first argument co you can pass options to your scripts

gpg -dq ./script.gpg 2>/dev/null |bash -s -- <args...>

This is also quite useful over ssh, send your script to remote, read back its output

05:10:50
16 Sep 2023
@pascalfuerst:matrix.org@pascalfuerst:matrix.org left the room.15:03:29
@asuras:nitro.chatAsuras joined the room.20:55:46
17 Sep 2023
@heliopolis:nitro.chatHeliopolis joined the room.06:37:35
21 Sep 2023
@lunardigs:matrix.orglunardigs 🌒 changed their display name from lunardigs (forwhatisthecometothisonehere?) to lunardigs (Jordachedude).23:35:22
22 Sep 2023
@arya:envs.netArya [Migrated to @arya:frei.chat] changed their display name from Arya [Migrated to @aryak:projectsegfau.lt] to Arya [Migrated to @arya:frei.chat].12:29:21
26 Sep 2023
@lunardigs:matrix.orglunardigs 🌒 changed their display name from lunardigs (Jordachedude) to lunardigs (docnarcolongo).01:35:29
@nazarewk:matrix.orgnazarewk changed their profile picture.12:06:03
28 Sep 2023
@Fernando-Basso:matrix.orgFernando-Basso
In reply to @dermoth:matrix.org

Fernando-Basso: correct, I'd swap the thing around though for clarity, and with -s you may need -- as your first argument co you can pass options to your scripts

gpg -dq ./script.gpg 2>/dev/null |bash -s -- <args...>

This is also quite useful over ssh, send your script to remote, read back its output

Can you provide an example?
14:00:38
@Fernando-Basso:matrix.orgFernando-Basso(I'm trying to come up with one myself.)14:01:24
@dermoth:matrix.orgdermoth Fernando-Basso: just pipe a script to bash -s -- and optionally pass some arguments. 18:44:00
@dermoth:matrix.orgdermothIn the example you quoted the script is decrypted and read from gpg18:44:35
29 Sep 2023
@vladam:matrix.org@vladam:matrix.org joined the room.06:47:17
7 Oct 2023
@arsh79:matrix.org@arsh79:matrix.org joined the room.16:07:31
@arsh79:matrix.org@arsh79:matrix.org left the room.16:08:28
@catfat:matrix.orgcatfat joined the room.16:15:16
9 Oct 2023
@stranded:matrix.org@stranded:matrix.org left the room.11:14:54
@pflegedissens:matrix.orgPFLEGENDE Angehörige joined the room.15:55:27
10 Oct 2023
@desdo88:matrix.org@desdo88:matrix.org left the room.20:42:57
12 Oct 2023
@ed25519:matrix.orged25519 joined the room.08:24:44
30 Oct 2023
@quietlyjaded:matrix.orgquietlyjaded joined the room.23:29:23
3 Nov 2023
@golu8:matrix.org@golu8:matrix.org joined the room.10:39:09

Show newer messages


Back to Room ListRoom Version: