SHARE
TWEET

Untitled

a guest Jan 15th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cat > version-check.sh << "EOF"
  2. #!/bin/bash
  3. # Simple script to list version numbers of critical development tools
  4.  
  5. export LC_ALL=C
  6. bash --version | head -n1 | cut -d" " -f2-4
  7. echo "/bin/sh -> `readlink -f /bin/sh`"
  8. echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
  9. bison --version | head -n1
  10. if [ -e /usr/bin/yacc ];
  11.   then echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
  12.   else echo "yacc not found"; fi
  13.  
  14. bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
  15. echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
  16. diff --version | head -n1
  17. find --version | head -n1
  18. gawk --version | head -n1
  19. if [ -e /usr/bin/awk ];
  20.   then echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
  21.   else echo "awk not found"; fi
  22.  
  23. gcc --version | head -n1
  24. ldd --version | head -n1 | cut -d" " -f2-  # glibc version
  25. grep --version | head -n1
  26. gzip --version | head -n1
  27. cat /proc/version
  28. m4 --version | head -n1
  29. make --version | head -n1
  30. patch --version | head -n1
  31. echo Perl `perl -V:version`
  32. sed --version | head -n1
  33. tar --version | head -n1
  34. echo "Texinfo: `makeinfo --version | head -n1`"
  35. xz --version | head -n1
  36.  
  37. echo 'main(){}' > dummy.c && gcc -o dummy dummy.c
  38. if [ -x dummy ]
  39.   then echo "gcc compilation OK";
  40.   else echo "gcc compilation failed"; fi
  41. rm -f dummy.c dummy
  42. EOF
  43.  
  44. bash version-check.sh
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top