Hi all,
I have written a bash script to do a few things for my Splunk deployment, however, I am currently stuck on one part...
I need to the current working directory (I collect this with `pwd`) in the script as it could in theory be run from a number of locations. I'm not that great with awk and haven't used it in a while. Below is the lines i'm trying to convert to/from:
FROM:
/var/tmp/scripts/testbed/tcpdump/bin
TO:
\\/var\\/tmp\\/scripts\\/testbed\\/tcpdump\\/bin
I need to add the "\\" to the path as i'm using echo -e to write to another file so one "\" will be escaped. and then I need the other to be there in the file (as it's part of a regex) I hope this makes sense.
Thanks in advance,
Matt