Last active 1748862246

Revision a5a818a8785549cc92aede7a7901442a8d0883db

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