Tiny Core Linux
General TC => Remasters / Remixes - Unofficial => Topic started by: kzpm on August 20, 2013, 02:05:35 PM
-
Hi tc-ers!
I'm still busy to fine-tune a remaster webkiosk based on TinyCore-current.iso
For remote administration purposes, I want to collect remote ip's from users.
The script to extract the remote IP is as follows
cd /home/tc/.X.d/
cat >> get_remote_ip << STOP
#!/bin/sh
..
result="$(wget -q -O - http://checkip.dyndns.org)"
wait $!
..
exit
STOP
chmod a+x get_remote_ip
When checking the script while the remaster is in operation, it looks like the script commands starting with "result" and "wait" are distorted.
It shows only
"result=" and "wait="
All instructions after the "=" operator vanished..
What is the best way according to you, to retain these commands at runtime?
Kind regards,
kzpm
-
Your $() and $! are being evaluated not copied.
If you want the lines copied, quote the $ characters.
Ex: \$(
Also, don't double post.
-
Thanks Gerald_clark!
I removed my post already on the "wrong" forum. It was not my intention to double post..
Regards,
Kzpm
-
As an alternative, quote your EOF marker. cat > file << "EOF"