AdminDev Labs

Shell Scripting Pt. 3


Listen Later

### Practical Scripts

Personal Task Manager
- Two scripts
- Add a task
- Find and display tasks
-- Weekly, annual, and single entry
-- Test for bad/incompatible formatting
-- Save the data to a hidden file
-- Second script changes current date into dayname, day and month, or day, month, and year
-- String comparison
-- Print tasks

Largest Disk Occupancy
- Loop through /etc/passwd (use cut to grab username and awk to iterate only UID over 99)
- Use find and -xdev to specific certian directories (saves time)
- Closing awk statement that only prints to accounts that have exceeded specified disk space
- Modify/evolve script to e-mail users that have excessive disk space

Provisioning Tool
- Uses virt-install
- Default values for RAM, CPU, and disk size
- CLI arguments to include values and override defaults if necessary
- Test for empty name and break out of script

Additional Resources
- The Linux Command Line
- Linux Command Line and Shell Scripting Bible
- Linux Academy
- Wicked Cool Shell Scripts
- learnshell.org
- linuxcommand.org

...more
View all episodesView all episodes
Download on the App Store

AdminDev LabsBy Chris Kennedy