≡ Menu

fi

FreeBSD Change User Password Shell Script

How do I change user password using a shell script under FreeBSD operating systems?
[click to continue…]

HowTo: Skip Bash For Loop

How do I skip bash for loop if certain condition is satisfied under UNIX / Linux / BSD / OS X?
[click to continue…]

Bourne Shell Exit Status Examples

Can you explains and provide us "Bourne Shell Exit Status Code" examples?
[click to continue…]

BASH Shell: Test If a File Is Writable or Not

Q. How can you test if a file is writable under UNIX / Linux bash shell scripting?
[click to continue…]

Linux bash for loop

Q. How do I use bash for loop under Linux operating systems?
[click to continue…]

How do I replace a string with another string in all files? For example, ~/foo directory has 100s of text file and I'd like to find out xyz string and replace with abc. I'd like to use sed or any other tool to replace all occurrence of the word.
[click to continue…]

Bash Shell Check Whether a Directory is Empty or Not

How do I check whether a directory is empty or not under Linux / UNIX using a shell script? I would like to take some action if directory is empty on a Linux or Unix like system. How can I check from bash/ksh shell script if a directory contains files? How do I check whether a directory is empty or not?
[click to continue…]