Skip to content

Instantly share code, notes, and snippets.

@caramelchocolate
Last active July 23, 2019 04:03
Show Gist options
  • Save caramelchocolate/4f142c6baa31c522ed714df709b3a869 to your computer and use it in GitHub Desktop.
Save caramelchocolate/4f142c6baa31c522ed714df709b3a869 to your computer and use it in GitHub Desktop.
list php version in jails
#!/bin/sh
jls | awk 'NR>1 {print $4}' | awk -F'/' '{print $NF}' | xargs -I@ sh -c 'j=@; v=$(jexec ${j} php -v | head -1); echo "${j}: ${v}"'
@caramelchocolate
Copy link
Author

result

jail_test: PHP 7.3.6 (cli) (built: Jul 6 2019 01:36:03) ( NTS )
jail_test2: PHP 7.1.30 (cli) (built: Jul 6 2019 01:35:15) ( NTS )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment