!esyCFwsvHGqLXuAxSC:matrix.org

Fun Shell Scripting

352 Members
Functional shell scripting knowledge exchange for UNIX experts. MUC bridge: xmpp:fun-shell@conference.movim.eu wikibooks.org/wiki/Bourne_Shell_Scripting tldp.org/LDP/Bash-Beginners-Guide/html github.com/Idnan/bash-guide github.com/lhunath/guide.bash.academy github.com/koalaman/shellcheck github.com/learnbyexample/learn_gnuawk manpages.ubuntu.com/manpages/bionic/man1/checkbashisms.1.html linuxcommand.org Let's review functions in live systems! Share funny snippets or discuss bugs. All variants welcome: BSD, Linux, POSIX, busybox, ash, sash, dash, bash, ksh93, zsh, mksh, pdksh, yash, bosh, posh, csh, tcsh, scsh, es, rash, xshell, ion, nushell, xonsh, oilshell, powershell, fish, elvish, execline, putty, grep, sed, awk. You agree to share snippets under the public domain (unless you otherwise declare it). Report abuse by typing !modhelp Examples shellscript.sh github.com/openwrt/openwrt/tree/master/package/base-files/files codeberg.org/Sapphire/sapphire-butler/src/branch/master/departments github.com/pacstall/pacstall-programs37 Servers

Load older messages


SenderMessageTime
16 Apr 2024
@iam_tj:matrix.orgiam_tj

I inserted bleah into the 2nd allocation but it is missed!

+ ID='bleah src 2001:db8:1000::0 dst 2001:db8:1000::1 proto esp spi 0xFFFFFFFF'
+ echo 'dst 2001:db8:1000::1 src 2001:db8:1000::0 proto esp spi 0xFFFFFFFF'
14:57:14
@iam_tj:matrix.orgiam_tj yeah I can; I only stuffed the unset in to see if that would help 14:57:51
@iam_tj:matrix.orgiam_tjhttps://termbin.com/jywp14:58:39
@iam_tj:matrix.orgiam_tj see ipsec_demo_xfrm() 14:58:59
@iam_tj:matrix.orgiam_tj you seem to have hit the nail on the head! I tried renaming the variables to ID1, ID2` etc., and they're all empty 15:03:09
@iam_tj:matrix.orgiam_tjso the here-doc doesn't let me allocate variables like that and I can see why, - quotes15:03:47
@iam_tj:matrix.orgiam_tjhmmm, how annoying!15:04:59
@iam_tj:matrix.orgiam_tj since I'm sourcing the file and then calling the functions there was an ID in the parent env 15:05:25
@iam_tj:matrix.orgiam_tjnow its gone any allocations in the here-doc do not do anything15:05:48
@iam_tj:matrix.orgiam_tjOK, I've worked around it by using 4 separate variables declared outside the here-doc15:10:48
@iam_tj:matrix.orgiam_tjFinally! fixed some typos and syntax errors and all commands now accepted15:14:56
@iam_tj:matrix.orgiam_tjstill can't get pings over the tunnel to work though, grrr!15:17:37
@iam_tj:matrix.orgiam_tjneed coffee!15:17:51
@iam_tj:matrix.orgiam_tj Wow! that coffee was good! Fixed it immediately - was missing dir in policies on both routers (with opposite src/dst values to the dir out) 15:28:04
@iam_tj:matrix.orgiam_tjSince this stuff is so complex to grok here's the working demo script: https://termbin.com/y20715:28:50
@iam_tj:matrix.orgiam_tjmight be good to keep a copy in case you ever need it!15:29:04
18 Apr 2024
@shkeezy:matrix.orgshkeezy joined the room.07:29:42
@steve-macdonald:maritimemethod.caStephen MacD changed their profile picture.16:50:51
19 Apr 2024
@eh93si1xx:matrix.orgeh93si1xx joined the room.00:39:19
@mortero:matrix.org@mortero:matrix.org joined the room.02:57:37
@mortero:matrix.org@mortero:matrix.org left the room.02:57:56
@keysersoze:techsaviours.orgKeyser Söze joined the room.15:12:51
@bkil:matrix.orgbkilchanged room power levels.20:20:39
20 Apr 2024
@b9joker108:matrix.orgb9joker108 joined the room.16:36:23
22 Apr 2024
@invisibleq:matrix.orginvisibleq joined the room.11:02:24
@altindayi:matrix.orgJackson#6 joined the room.23:06:29
23 Apr 2024
@glooomy:matrix.org@glooomy:matrix.org rejected invite.11:23:21
24 Apr 2024
@amandasanthos:matrix.orgAmanda Santhos joined the room.23:33:05
26 Apr 2024
@bsdhazz:matrix.orgbsdhazz joined the room.05:18:31
@monila:hackliberty.orgmonila joined the room.20:07:03

There are no newer messages yet.


Back to Room ListRoom Version: 9