Advertisement
Guest User

Untitled

a guest
Jan 14th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.54 KB | None | 0 0
  1. #!/bin/bash
  2. # Simple script to list version numbers of critical development tools
  3. export LC_ALL=C
  4. bash --version | head -n1 | cut -d" " -f2-4
  5. MYSH=$(readlink -f /bin/sh)
  6. echo "/bin/sh -> $MYSH"
  7. echo $MYSH | grep -q bash || echo "ERROR: /bin/sh does not point to bash"
  8. unset MYSH
  9.  
  10. echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
  11. bison --version | head -n1
  12.  
  13. if [ -h /usr/bin/yacc ]; then
  14.   echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
  15. elif [ -x /usr/bin/yacc ]; then
  16.   echo yacc is `/usr/bin/yacc --version | head -n1`
  17. else
  18.   echo "yacc not found"
  19. fi
  20. bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
  21. echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
  22. diff --version | head -n1
  23. find --version | head -n1
  24. gawk --version | head -n1
  25. if [ -h /usr/bin/awk ]; then
  26.   echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
  27. elif [ -x /usr/bin/awk ]; then
  28.   echo awk is `/usr/bin/awk --version | head -n1`
  29. else
  30.   echo "awk not found"
  31. fi
  32. gcc --version | head -n1
  33. g++ --version | head -n1
  34. ldd --version | head -n1 | cut -d" " -f2-  # glibc version
  35. grep --version | head -n1
  36. gzip --version | head -n1
  37. cat /proc/version
  38. m4 --version | head -n1
  39. make --version | head -n1
  40. patch --version | head -n1
  41. echo Perl `perl -V:version`
  42. sed --version | head -n1
  43. tar --version | head -n1
  44. makeinfo --version | head -n1
  45. xz --version | head -n1
  46.  
  47. echo 'int main(){}' > dummy.c && g++ -o dummy dummy.c
  48. if [ -x dummy ]
  49.   then echo "g++ compilation OK";
  50.   else echo "g++ compilation failed"; fi
  51. rm -f dummy.c dummy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement