Shell Tips & Tricks
SHELLdorado - your UNIX shell scripting resource
Tips&Tricks Home
Beginner
Intermediate
Script Programmer
Advanced
Submit a new Tip
Beginner
Determine where a command is
Suspending and resuming a command
Using arrow keys in kornshell
Removing ^M's in imported DOS and MAC files
Print enviroment variables in an easy to read format
Include the current directory within your prompt
Running a script without changing file access permissions
How to set the title of a XTERM window
Show current directory in the XTerm window title bar
Show current directory in the XTerm window title bar (2)
Welcome the user as they login to the system
Displaying only the subdirectories from the current directory
Displaying only the subdirectories from the current directory (2)
Displaying only the subdirectories from the current directory (3)
Bookmark and browse directories
Finding files recursively which match a certain pattern
Finding files recursively which match a certain pattern (2)
Finding files recursively which match a certain pattern (3)
Show PATH elements one per line
Show PATH elements one per line(2)
To reverse a file
To reverse a file(2)
To reverse a file (3)
improved cd
Returning to the starting directory
Repeat any command, not only the last
Echo and nested commands
Sum of Digits of a Number
Intermediate
Providing default file name arguments to scripts
Comfortable directory list
Search and replace with extended regular expressions
Indenting lines
How to execute a script for each logout
Case-insensitive pattern matching
Split a file into multiple files depending on a key value
Copy directory and subdirectories
Copy directory and subdirectories (2)
Making xterm titles match current directory
Script Programmer
"comment out" code blocks
"comment out" code blocks (2)
"comment out" code blocks (3)
cleaning up tmp files
cleaning up tmp files (2)
Convert "relative" in "absolute" path name
Positioning the cursor from within shell scripts
Setting default values for variables
Getting a file into "memory"
Find user's name
Find user's name (2)
Using "here-documents" instead of multiple "echo"
Using "here-documents" instead of multiple "echo" (2)
To find idle users
Using ksh builtins instead of external commands
KSH build-in networking functions
"Normalize" input field separators
To Reverse a File
Script debugging settings
Enable "set -x" for all functions
Swapping stdout and stderr
Quickly comment/uncomment whole scripts
Find yesterday's date
Advanced
Stop simultaneous execution of the same script
Stop simultaneous execution of the same script (2)
Backup Log files without renaming and interrupting service
saving stdout, stderr and both into 3 separate files
Last recent update: 2022-01-24
Copyright © 1998-2022 Heiner Steven (
[email protected]
)