| /l3/users/28-09-2015/NT-Ladm/debian1.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 |
|
|
#cat install | fgrep -i [a-z] insta;;
l3script: syntax error near unexpected token `;;' |
|
#cat install | fgrep -i [a-z] install
|
|
#$?
l3script: 1: команда не найдена |
|
#cat install | grep-v '` `'
l3script: grep-v: команда не найдена |
|
#cat install | grep -v '` `'
#!/bin/sh
hostname=`hostname`
uname -a | egrep -qi '(freebsd|darwin)' || hostname=`hostname -f`
###############################################################################
#
# Set this variables before installation:
lilalo_user=13-10-2014
lab=NT-LNet
install_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3agent and l3script
lilalo_context="/users/${lilalo_user}/${lab}/${hostname}"
...
step "Downloading l3prompt" ${wget} ${url_l3prompt}
step "Downloading l3-agent" '${wget} ${url_l3agent}; ${wget} ${url_l3config_pm}; ${wget} ${url_l3config}'
step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.tar.gz; done; }'
step "Installing perl modules for l3-agent" '{ for i in ${perl_modules}; do tar xvfz $i.tar.gz; cd $i*[^z]; perl Makefile.PL; make; make install; cd ..; done; }'
step "Installing l3bashrc to users home directories" install_to_users_homes $install_l3bashrc_for_this_users
step "Adding l3bashrc invocation to ~/.bashrc " install_to_users_bashrc $install_l3bashrc_for_this_users
step "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users
cd /
rm -rf ${temp_dir}
show_final_message
|
|
#cat install | grep '` `'
|
|
#cat install | grep '`^ $`'
|
|
#cat install | grep -v '`^ $`'
#!/bin/sh
hostname=`hostname`
uname -a | egrep -qi '(freebsd|darwin)' || hostname=`hostname -f`
###############################################################################
#
# Set this variables before installation:
lilalo_user=13-10-2014
lab=NT-LNet
install_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3agent and l3script
lilalo_context="/users/${lilalo_user}/${lab}/${hostname}"
...
step "Downloading l3prompt" ${wget} ${url_l3prompt}
step "Downloading l3-agent" '${wget} ${url_l3agent}; ${wget} ${url_l3config_pm}; ${wget} ${url_l3config}'
step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.tar.gz; done; }'
step "Installing perl modules for l3-agent" '{ for i in ${perl_modules}; do tar xvfz $i.tar.gz; cd $i*[^z]; perl Makefile.PL; make; make install; cd ..; done; }'
step "Installing l3bashrc to users home directories" install_to_users_homes $install_l3bashrc_for_this_users
step "Adding l3bashrc invocation to ~/.bashrc " install_to_users_bashrc $install_l3bashrc_for_this_users
step "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users
cd /
rm -rf ${temp_dir}
show_final_message
|
|
#sed
Использование: sed [ОПЦИЯ]... {только-скрипт-если-нет-другого-скрипта} [входной-файл]...
-n, --quiet, --silent
не выводить автоматически промежутки
-e script, --expression=script
добавление скрипта в исполняемые команды
-f script-file, --file=script-file
добавление содержимого файла-скрипта в исполняемые команды
--follow-symlinks
переходить по символьным ссылкам при обработке на месте
-i[СУФФИКС], --in-place[=СУФФИКС]
...
загрузка минимального объема данных из входных файлов
и более частый сброс на диск выходных буферов
--help вывод этой справки и выход
--version вывод информации о версии и выход
Если опция -e, --expression, -f, или --file не указана, тогда первый
неопциональный аргумент берется как скрипт sed для интерпретации. Все
оставшиеся аргументы являются именами входных файлов; если входные
файлы не указаны, тогда читается стантартный ввод.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
|
|
#sed 's/[a-z]//I' install
#!/in/sh
ostname=`hostname`
name -a | egrep -qi '(freebsd|darwin)' || hostname=`hostname -f`
###############################################################################
#
# et this variables before installation:
ilalo_user=13-10-2014
ab=NT-LNet
nstall_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3agent and l3script
ilalo_context="/users/${lilalo_user}/${lab}/${hostname}"
...
tep "Downloading l3prompt" ${wget} ${url_l3prompt}
tep "Downloading l3-agent" '${wget} ${url_l3agent}; ${wget} ${url_l3config_pm}; ${wget} ${url_l3config}'
tep "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.tar.gz; done; }'
tep "Installing perl modules for l3-agent" '{ for i in ${perl_modules}; do tar xvfz $i.tar.gz; cd $i*[^z]; perl Makefile.PL; make; make install; cd ..; done; }'
tep "Installing l3bashrc to users home directories" install_to_users_homes $install_l3bashrc_for_this_users
tep "Adding l3bashrc invocation to ~/.bashrc " install_to_users_bashrc $install_l3bashrc_for_this_users
tep "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users
d /
m -rf ${temp_dir}
how_final_message
|