SH shell different than documented?
Imaginos last edited by
In the interest of full disclosure, my sh skills are 20+ year old and it's also entirely possible that I'm a committed idiot, however,
I cannot get a single sh command evaluation to work at the pfsense shell the way the freebsd sh manual describes.
At the command prompt, $(/bin/cat /tmp/vpn_ip) works just fine, however, including it elsewhere or in a script such as
echo $(/bin/cat /tmp/vpn_ip)
I forever get 'illegal variable name' and I cannot unravel why. I've tried the $@ and $* flavors, as well as '' and I'm utterly baffled as to what I'm screwing up.
Final usage will be a modified version of the below
/usr/local/bin/curl -d "user=USERNAME&pass=PASSWORD&client_id=$@(/bin/cat ~/.pia_config)&local_ip=$(/bin/cat /tmp/vpn_ip)" https://www.privateinternetaccess.com/vpninfo/port_forward_assignment -o /tmp/vpnportforward
Is there a reference that describes how to change a port alias from the command line?
The shell is tcsh, which differs from /bin/sh
And if you're used to some other OS, /bin/sh there might even be something like bash
Check the FreeBSD man pages for sh and tcsh to see what syntax works in each.