≡ Menu

existence

Bash Shell: Check File Exists or Not

How do I test existence of a text file in bash running under Unix like operating systems?
[click to continue…]

Bash Shell: Find Out If a Variable Is Set or Not

How do I check if a bash shell variable called $input is defined or not under BSD / Apple OS X / Unix / Linux like operating systems?
[click to continue…]

I've tons of images, css and javascript hosted at backend server IP 192.168.1.5 and 192.168.1.6. How do I make sure nginx reverse proxy load balancer always send all http_user_agent requests coming from "Mozilla" to server 192.168.1.5 and MSIE to server 192.168.1.6 only?
[click to continue…]

Linux Bash Script Check File Existence

How do I check if a file called /tmp/foo.txt exists or not using a shell script under Linux operating systems?
[click to continue…]