AdminDev Labs
AdminDev Labs
Chris Kennedy
Shell Scripting Pt. 2
23 minutes Posted Nov 21, 2019 at 2:39 pm.
0:00
23:51
Download MP3
Show notes

### Reading from Files and Databases - Files -- List of commands -- The "read" command - Databases -- MySQL .my.cnf file, Postgres .pgpass -- Save path to variable -- <<EOF to run/chain queries -- Insert values with arguments

### GUI Menus - dialog -- msgbox: Short message followed by OK button -- yesno: msgbox with Yes/No options -- Use status option to proceed -- textbox: Presents data (disk usage, memory info, message/e-mail) -- menu: Create a menu with title, selector, and text

- kdialog -- For KDE environment -- Not as flexible -- Similar widgets as dialog - zenity -- Gnome environment -- Installed out of the box on Fedora -- Similar to kdialog, more aesthetically pleasing (personal preference)

- Why GUI Menus -- Installer/Setup -- Reporting -- Analytics -- Ease someone (dev/QA) into sysadmin

### E-mail - mailx -- Send messages through SMTP -- Provide complete information via arguments -- Pipe message to mailx command -- Simple notification system for successful/failed script