Advertisement
Guest User

Untitled

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