9 FAQ tagged "bash_shell"
Viewing 1-9 of 9 FAQ -- Shell script reverse lines of a file
Q. How do I reverse lines of a file under Linux / UNIX bash shell?
A. You need to use the rev utility or command. It copies the specified files to the standard output, reversing the order of characters in every line. If no files are specified, the standard input is read.
Display one [...] - Display or print UNIX / Linux path ~ $PATH variable
Q. How do I print current path settings under BASH shell? I’m using Debian Linux.
A. In UNIX / Linux file systems, the human-readable address of a resource is defined by PATH. On Unix / Linux like operating systems, (as well as on DOS / Windows and its descendants), PATH is an environment variable listing a [...] - How to: Change User’s bash profile under Linux / UNIX
Q. How do I change my own profile? How do I change profile for other users? How do I setup global profile for all users under BASH shell?
A.. You need to add user profile to ~/.bash_profile. It is the personal initialization file, executed for login shells. There is also ~/.bashrc file which is [...] - Printing output of c program to a file in Linux
Q. I’ve written a small program that does something useful for me. I always get output on screen. Sometime I need to send output to a file. How do I print output of my program to a file w/o making any changes to code?
A. Bash shell (and many other modern UNIX shell) supports the concept [...] - BASH Shell setup filename tab-completion case insensitive
Q. I’m using BASH shell filename tab completion feature to complete file names and other stuff. However default tab-completion in bash case-sensitive. It cannot show me /tmp/Y* or /tmp/Y* files. How do I force filename tab-completion in bash case insensitive?
A. According to bash man page completion-ignore-case set to Off. If set to [...] - Clear all Linux / UNIX bash shell aliases
Q. How do I clear all UNIX bash shell aliases get cleared in one command. I’ve 20 aliases sometime I just need to delete them in a current session. How do I get rid of all of them?
A. You need to use unalias command/
unalias command syntax
unalias name
To remove alias called foo, enter
$ unalias foo
alias [...] - Force Linux / UNIX bash shell to correct spelling of a directory name
Q. There is a way to cd a particular directory even if you spelled incorrectly on the command line. The command was added to my shell startup file. After formatting my hard disk, I lost my original file. Can you tell me the shell option or command that will automatically correct errors in the spelling [...]
- BASH shell insert the arguments to a previous command into the current input line
Q. I’m using CentOS Linux server. How do I insert the arguments to a previous command into the current input line or fix errors in previous commands quickly?
A. BASH History expansion is useful and time saving feature. To designates the last argument of the preceding command use !$
For example, consider following command:
$ cp /tmp/file.name /path/to/somewhere/directory/file.name
$ [...] - Understanding command line shell
Q. I’ve migrated from Windows NT to Linux workstation. Most documents refer to a command line shell. Can you explain me command line shell?
A. A shell allows you to type the commands such as date or clear. There are many shell available. BASH (bourne again shell) is default shell for most Linux distributions.
It also known [...]
Viewing 1-9 of 9 FAQ - ( see all popular tags )



Recent Comments
Today ~ 70 Comments
Today ~ 2 Comments
Yesterday ~ 10 Comments
Yesterday ~ 12 Comments
09/03/2008 05:29 pm (2 days ago) ~ 6 Comments