Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bash:
- [[ $- == *i* ]] && echo 'Interactive' || echo 'Non-Interactive'; shopt -q login_shell && echo 'Login' || echo 'Non-Login'
- zsh:
- [[ -o interactive ]] && echo "Interactive" || echo "Non-Interactive"; [[ -o login ]] && echo "Login" || echo "Non-Login"
Advertisement
Add Comment
Please, Sign In to add comment