Advertisement
IsraelTorres

genconfig.sh

May 11th, 2011
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.71 KB | None | 0 0
  1. #!/bin/bash
  2. # genconfig.sh
  3. # Israel Torres
  4. # generate system configuration output
  5. # Tue May 10 21:14:40 PDT 2011 further beautification applied
  6. macver=$(sw_vers | cut -f 2 | tr '\n' ' ')
  7. sysver=$(system_profiler SPHardwareDataType | grep -E 'Processor Name|Processor Speed|Memory' | cut -d : -f 2 | sed 's/^ //g' | tr '\n' ' ')
  8. #bashver=$(bash --version | grep version)
  9. bashver=$(bash --version | grep version | cut -d '(' -f 1,2 )
  10. #viver=$(vi --version | grep 'compiled')
  11. viver=$(vi --version | grep 'compiled' | cut -d '(' -f 1 )
  12. gdbver=$(gdb --version | grep 'GNU gdb' | cut -d '(' -f 1 )
  13. #darver=$(uname -v)
  14. darver=$(uname -v | cut -d : -f 1)
  15.  
  16. echo -e "$macver\n$sysver\n$darver\n$bashver\n$viver\n$gdbver"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement