9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to ssh remotely to a machine and cat a file assign the value to a variable
ssh email@example.com "valu='cat /export/home/test.md5'; echo "$valu"" | tee
++ cat config.txt
+ value='touch me'
+... (5 Replies)
Discussion started by: close2jay
2. Shell Programming and Scripting
I'm on a remote computer by SSH. How can I get the output of "cat file" into a file on the local computer?
I cannot use scp, because it's blocked.
ssh root@remote_maschine "cat /file" > /locale_machine/file
:rolleyes: (2 Replies)
Discussion started by: borsti007
3. Shell Programming and Scripting
I'm using redhat and have an odd issue with a nested ssh call.
ssh -i ~/.ssh/transfer-key -q transfer@fserver1 ]
&& ssh -i ~/.ssh/transfer-key transfer@fserver1 "ssh -i ~/.ssh/sftp-key firstname.lastname@example.org ]"
&& ssh -i ~/.ssh/transfer-key transfer@fserver1 "scp -i ~/.ssh/sftp-key /home/S/outbox/*... (2 Replies)
Discussion started by: say170
4. UNIX for Dummies Questions & Answers
I am trying to write a script to automatically create conf files and remote servers. I would like to do all this without creating files locally and copying them .
Here is what I have tried.
ssh $prodserver "cat > /data/$sitename.conf" << cat |sed... (5 Replies)
Discussion started by: macrossm
5. Shell Programming and Scripting
how to cat a file by ignoring first line and last line (1 Reply)
Discussion started by: thelakbe
6. Shell Programming and Scripting
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
sort -n -r -k 2 -k 1 averages | uniq > temp
It wrote a whole... (21 Replies)
Discussion started by: shira
7. UNIX for Dummies Questions & Answers
Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX?
Thanks (6 Replies)
Discussion started by: skyineyes
8. UNIX for Dummies Questions & Answers
I want to cat a file with only show the line contain '/bin/bash' but don't show the line contain 'load' (don't show if the line contain 'load' and '/bin/bash' together), how to type in the command? thk a lot! (2 Replies)
Discussion started by: zp523444
9. UNIX for Dummies Questions & Answers
Not sure how to do this exactly.. just want to take the first 100 lines of a file and cat it out into a second file. I know I can do a more on a file and > it into a different file, but how can I make it so only the first 100 lines get moved over? (1 Reply)
Discussion started by: LordJezo