/l3/users/28-09-2015/NT-Ladm/debian4.net.nt/root :1 :2 :3 :4 :5 :6 :7 |
|
#mv repotr report2
![]() mv: не удалось выполнить stat для «repotr»: Нет такого файла или каталога |
#date >> report
![]() l3script: report: Отказано в доступе |
#ls
all file1 file3 file5 install report errors file2 file4 files privet.sh shadow |
#ls f*
file1 file2 file3 file4 file5 files |
#ls -1 f* | sort -r
files file5 file4 file3 file2 file1 |
#ls -1 f* | sort
file1 file2 file3 file4 file5 files |
#ls -1 f* | rm -f
|
#ls
all file1 file3 file5 install report errors file2 file4 files privet.sh shadow |
#rm -f
|
#ls
all file1 file3 file5 install report errors file2 file4 files privet.sh shadow |
#ls -1 f* | xargs rm -f
|
#ls
all errors install privet.sh report shadow |
#cat install
#!/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 users
install_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3agent and l3script lilalo_context="/users/${lilalo_user}/${lab}/${hostname}" install_to_users_homes() users="$@" for user in $users install_to_users_bashrc() users="$@" for user in $users install_to_users_bash_profile() users="$@" for user in $users 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 |
#cat install | grep -n users
12:install_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3agent and l3script 13:lilalo_context="/users/${lilalo_user}/${lab}/${hostname}" 85:install_to_users_homes() 88: users="$@" 90: for user in $users 110:install_to_users_bashrc() 112: users="$@" 113: for user in $users 121:install_to_users_bash_profile() 123: users="$@" 124: for user in $users 178:step "Installing l3bashrc to users home directories" install_to_users_homes $install_l3bashrc_for_this_users 179:step "Adding l3bashrc invocation to ~/.bashrc " install_to_users_bashrc $install_l3bashrc_for_this_users 180:step "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users |
#cat install | grep -c users
14 |
#cat install | grep 'users$'
for user in $users for user in $users for user in $users 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 |
#cat install | grep '^step'
step() step "Installing dependencies" apt_get_install_deps step "Downloading l3bashrc" ${wget} ${url_l3bashrc} 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 |
#cat install | grep '^'
#!/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 -c '^&'
![]() 0 |
#cat install | grep -c '^$'
31 |
#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 |
#grep --help
ÐÑполÑзование: grep [ÐÐÐ ÐÐÐТР]⦠ШÐÐÐФÐÐÐ ² ÑÑандаÑÑном вводе. Ðо ÑмолÑаниÑ, ШÐÐлÑÑное вÑÑажение (BRE). ÐÑимеÑ: grep -i 'hello world' menu.h main.c ÐÑÐ±Ð¾Ñ Ñипа ÑегÑлÑÑного вÑÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð¸ его инÑеÑпÑеÑаÑиÑ: -E, --extended-regexp ШÐÐÐие (ERE) -F, --fixed-regexp ШÐÐÐделÑннÑе Ñимволом новой ÑÑÑоки -G, --basic-regexp ШÐÐÐ RE) ... ÐÑли в каÑеÑÑве ФÐÐаÑÑнÑй ввод. ÐÑли ФÐÐой ÑÑÑоки -r, Ñо ÑиÑаеÑÑÑ ÑекÑÑий каÑалог (.). ÐÑли Ñказано менее двÑÑ Ð¤ÐÐÐ. ÐÑи Ð½Ð°Ñ Ð¾Ð¶Ð´ÐµÐ½Ð¸Ð¸ Ñовпадений лÑбой ÑÑÑоки, кодом завеÑÑÐµÐ½Ð¸Ñ Ð¿ÑогÑÐ°Ð¼Ð¼Ñ Ð±ÑÐ´ÐµÑ 0, и 1, еÑли ниÑего не Ñовпало. ÐÑи возникновении оÑибок и еÑли не Ñказан паÑамеÑÑ -q, кодом завеÑÑÐµÐ½Ð¸Ñ Ð±ÑÐ´ÐµÑ 2. Ðб оÑÐ¸Ð±ÐºÐ°Ñ ÑообÑайÑе по адÑеÑÑ <bug-grep@gnu.org> Ðб оÑÐ¸Ð±ÐºÐ°Ñ Ð² пеÑеводе ÑообÑайÑе по адÑеÑÑ <gnu@mx.ru> ÐомаÑнÑÑ ÑÑÑаниÑа GNU Grep: <http://www.gnu.org/software/grep/> СпÑавка по ÑабоÑе Ñ Ð¿ÑогÑаммами GNU: <http://www.gnu.org/gethelp/> |
#cat install | grep '^[abc]'
apt_get_install_this="perl make libmodule-build-perl libc6-dev gcc" apt_get_install_deps() cd ${temp_dir} cd / |
#cat install | grep '^[^abc]'
#!/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_f |