0
I want to check for read only file systems. I wrote this awk
command and it works fine:
awk '{ if ( $4 ~ /ro,/ && $2 !~ /sys/ ) {print $2} }' /proc/mounts
I want to use this command with ssh
. This doesn't work:
$ ssh ip "awk '{ if ( $4 ~ /ro,/ && $2 !~ /sys/ ) {print $2} }' /proc/mounts"
bash: !~: event not found
How can I do this? Is the problem because of the tilde character?
I like to do #3 by running PHP's
– Deltik – 2019-09-17T12:15:45.693escapeshellarg()
on the argument. There's a way to run the function online, if one doesn't have PHP locally.