IsraelTorres

genconfig.sh

Aug 23rd, 2011
198
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. # Tue Aug 23 12:38:17 PDT 2011 updated and cleaned up
  7. #
  8. macver=$(sw_vers | cut -f 2 | tr '\n' ' ')
  9. sysver=$(system_profiler SPHardwareDataType | grep -E 'Processor Name|Processor Speed|Memory' | cut -d : -f 2 | sed 's/^ //g' | tr '\n' ' ')
  10. bashver=$(bash --version | grep version | cut -d '(' -f 1,2 )
  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 | cut -d : -f 1)
  14. gccver=$(gcc --version | head -1| cut -d '(' -f 1,2)
  15. echo -e "$macver\n$sysver\n$darver\n$bashver\n$viver\n$gdbver\n$gccver"
  16. #
  17. #EOF
RAW Paste Data