![]() |
Echo into a file
I've found 2 slightly different syntaxes for redirecting the output of echo into a file on the shell:
Code:
echo "something" > fileCode:
echo "something" >> file |
Code:
echo "something" > fileCode:
echo "something" >> file"file" will be created if it doesn't exist in both cases. A little example: We have the file "file" with the following contents: Code:
line 1Code:
echo "something" > fileCode:
somethingCode:
echo "something" >> fileCode:
line 1 |
>> means append
You are just addiing to the file as stated above.
|
thank you for the informative post and keep up the good work!
|
Echo to another server
Just wondering how to echo to another (fingerprinted) server?
Code:
echo "something" >> user@server:fileCode:
ssh user@server echo "something" >> file |
use variable:
X_X="echo something >> file" ssh user@server $X_X |
| All times are GMT +2. The time now is 08:31. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.