My proxy server password has special characters such as !,@, and so on. How do I set and export the variable called http_proxy or HTTP_PROXY when password has special characters under Unix like operating systems?
I have setup a master / local server combination using OpenSSH. My local server depends upon master server for a remote sourcing. The remote sourcing should set a large number of variables locally in a bash shell script. The code is:
user@slave $ source ssh user@master "/service/dyn.master.setenv.sh --mode=slave"
echo “$var”
The var is not setting and I am getting various errors. How can I do a remote "source" of a bash script file (from master.example.com) and set a shell variable locally at slave.example.com?
I am using GNU Screen software application to multiplex several virtual consoles. I can access multiple separate terminal sessions inside a single terminal window over remote ssh terminal session. Often I need to go though server logs located in /var/ directory. I can not seem to scroll up when I run tail -f /var/log/messages or /var/log/secure file. How do I use page-up / page-down keys to scroll up under GNU scree?
I need to transfer a file called ‘some cool movie.avi’ that contains whitespace under rsync. How do I escape a filename or directory name with spaces in them while using rsync command under Linux / *BSD / Unix like operating systems? How do I use rsync when files / dirs contain spaces?
I have a data as follows :
foo bar 12,300.50
foo bar 2,300.50
abc xyz 1,22,300.50
How do I replace all , from 3rd field using awk and pass output to bc -l in the following format to get sum of all numbers:
12300.50+2300.50+1,22,300.50
I have a number stored in a shell variable called x=”240570.578″. I would like to print $x as 2,40,570.57. How do I replace the number with their currency format under bash shell scripts?
I have a sample data file:
This is a test.
Unix is Best.
No Linux is the Best.
Space in simple understanding is an area or volume.
Outer space .
I need the output:
Unix is Best.
Outer space .
How do I print all lines that have three (3) words only?