https://stackoverflow.com/questions/13032409/ssh-remote-variable-assignment
#linux #sysadmin #ssh #local_variable #variable_expansion #bashrc #export
#linux #sysadmin #ssh #local_variable #variable_expansion #bashrc #export
Stack Overflow
ssh remote variable assignment?
The following does not work for me:
ssh [email protected] "k=5; echo $k;"
it just returns an empty line.
How can I assign a variable on a remote session (ssh)?
Note: My question is not about ...
ssh [email protected] "k=5; echo $k;"
it just returns an empty line.
How can I assign a variable on a remote session (ssh)?
Note: My question is not about ...
How to copy a file in the same path with a different name?
Well you just need to use curly braces, {}, to make it happen:
What you usually MIGHT do:
You can take the smart path btw:
NOTE: if suffix of both files are different you can put that inside of curly braces too.
#linux #sysadmin #cp #copy #trick
Well you just need to use curly braces, {}, to make it happen:
What you usually MIGHT do:
cp /usr/local/share/lib/sample.conf /usr/local/share/lib/settings.conf
You can take the smart path btw:
cp /usr/local/share/lib/{sample,settings}.confNOTE: if suffix of both files are different you can put that inside of curly braces too.
#linux #sysadmin #cp #copy #trick