Christian Palacios
asked on
Linux create command with double quotes
Hi there,
I'm trying to dynamically create this string in a variable so that I can then run "eval" on it and run the command remotely on another Linux VM.
ssh oracle@10.41.22.69 "md5sum /data/oracle/dpdump/onegeo /ONEGEO201 71214.DMP | awk '{ print \$1 }'"
I can get the string working until the "awk" part and then no matter what I try, I keep getting errors when trying to properly create the rest of the string with single quotes. The double and single quotes in the string are all required.
I tried this but it didn't work, what am I missing?
md5command='ssh oracle@10.41.22.69 "md5sum /data/oracle/dpdump/onegeo /'$DMPfile name' | awk '\'{ print \$1 }\''
Any help would be appreciated!!
Thanks,
- Christian
I'm trying to dynamically create this string in a variable so that I can then run "eval" on it and run the command remotely on another Linux VM.
ssh oracle@10.41.22.69 "md5sum /data/oracle/dpdump/onegeo
I can get the string working until the "awk" part and then no matter what I try, I keep getting errors when trying to properly create the rest of the string with single quotes. The double and single quotes in the string are all required.
I tried this but it didn't work, what am I missing?
md5command='ssh oracle@10.41.22.69 "md5sum /data/oracle/dpdump/onegeo
Any help would be appreciated!!
Thanks,
- Christian
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER