Last active 1748862246

Revision 9e1203d4b3af956fc9dc49ea58abfed6d4bf80f8

shell_non_interactif.sh Raw
1if [[ $- == *i* ]]; then
2 # action réservé à un shell interactif
3 cat machin.bidule
4fi
5
6# ou placer ce qui suis au début du .bashrc de façon a interrompre le chargement de bashrc si le script n'est pas interactif.
7
8# If not running interactively, don't do anything
9case $- in
10 *i*) ;;
11 *) return;;
12esac
13
14#ou
15
16if [[ ! $- == *i* ]]; then
17 # si le shell n'est pas interactif
18 return 0
19fi
20
21