inizio script
Inviato: ven 30 giu 2006, 1:02
la mia domanda è se esiste uno scipt che esegue all'inizio, quando un user logged in???
gracias.-
gracias.-
Se non è una shell di login ~/.bashrc.When bash is invoked as an interactive login shell, or as a non-interactive
shell with the --login option, it first reads and executes commands from the
file /etc/profile, if that file exists. After reading that file, it looks
for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads
and executes commands from the first one that exists and is readable. The
--noprofile option may be used when the shell is started to inhibit this
behavior.
Codice: Seleziona tutto
# ~/.bash_profile
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fiquesto non in slackware, ma ad esempio in fedorabruno82 ha scritto:In raltà mi sembra che ~/.bashrc sia sempre lanciato da ~/.bash_profile
no, serve quando lanci una shell interattiva (quindi non di login)bruno82 ha scritto: quindi forse ~/.bashrc serve solo per una questione di ordine, per non riempire ~/.bash_profile di righe meno importanti (boh?!)