4 FAQ tagged "shell variable"
Viewing 1-4 of 4 FAQ -- Bash Shell Loop Over Set of Files
How do I run shell loop over set of files stored in a current directory or specified directory?
- Find the file permission without using ls -l command
Q. I need to find file permission and store the same to a shell variable. How do I find out the file permission without parsing ls -l output?
A. Use GNU stat command to display file or file system status. It has option to display output in specific format.
Display stat for /etc/passwd file
Type the [...] - How to: create a temporary file securely
Q. How do I create a temporary file securely under UNIX Bash shell?
A. There are many ways:
[a] mktemp command - make temporary unique filename
[b] $RANDOM - Use $RANDOM variable
mktemp command
From the man page:
The mktemp utility takes the given filename template and overwrites a portion of it to create a unique filename. The [...] - BASH Shell change the color of my shell prompt under Linux or UNIX
Q. How do I change the color of my shell prompt under Linux ?
A. You can change the color of your shell prompt to impress your friend or to make your own life quite easy while working at command prompt.
In the Linux default shell is BASH.
Your current prompt setting is stored in PS1 shell [...]
Viewing 1-4 of 4 FAQ - ( see all popular tags )



Recent Comments
Today ~ 9 Comments
Today ~ 6 Comments
Yesterday ~ 6 Comments
Yesterday ~ 68 Comments
Yesterday ~ 8 Comments