Run command through ssh not working

Hi there,

I'm trying to run this command to get the value assigned to the variable, but it's not working.  I want to check the md5 sum of a file after it has been copied to another Linux server:

md5sumcommandazure=$(ssh oracle@10.41.22.69 "md5sum /data/oracle/dpdump/onegeo/ONEGEO20180118-093843.DMP | awk '{ print "'\$1'" }'"'"')

I'm getting this error, what am I missing?

bash: -c: line 0: unexpected EOF while looking for matching `"'
bash: -c: line 1: syntax error: unexpected end of file

Thanks!
- Christian
Christian PalaciosSenior IT Systems AdministratorAsked:
Who is Participating?
 
joolsCommented:
try

md5sumcommandazure=$(ssh oracle@10.41.22.69 "md5sum /data/oracle/dpdump/onegeo/ONEGEO20180118-093843.DMP | awk '{ print $1 }'")
0
 
Christian PalaciosSenior IT Systems AdministratorAuthor Commented:
Awesome, thank you!  I was adding way too much too it :)
0
 
Christian PalaciosSenior IT Systems AdministratorAuthor Commented:
Great!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.