Журнал лабораторных работ

Содержание

Журнал

Вторник (09/29/15)

/dev/pts/0
10:32:18
#mv repotr report2
mv: не удалось выполнить stat для «repotr»: Нет такого файла или каталога
10:32:49
#date >> report
l3script: report: Отказано в доступе
10:32:56
#ls
all     file1  file3  file5  install    report
errors  file2  file4  files  privet.sh  shadow
прошло 23 минуты
10:56:03
#ls f*
file1  file2  file3  file4  file5  files
10:56:10
#ls -1 f* | sort -r
files
file5
file4
file3
file2
file1
10:56:47
#ls -1 f* | sort
file1
file2
file3
file4
file5
files
10:56:56
#ls -1 f* | rm -f

10:57:14
#ls
all     file1  file3  file5  install    report
errors  file2  file4  files  privet.sh  shadow
10:57:19
#rm -f

10:57:43
#ls
all     file1  file3  file5  install    report
errors  file2  file4  files  privet.sh  shadow
10:57:46
#ls -1 f* | xargs rm -f

10:58:21
#ls
all  errors  install  privet.sh  report  shadow
10:58:23
#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
прошло 119 минут
12:57:26
#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
12:57:58
#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
12:58:23
#cat install | grep -c users
14
12:58:53
#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
13:01:32
#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
13:02:01
#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
13:02:36
#cat install | grep '^&'

13:02:43
#cat install | grep -c '^&'
0
13:02:50
#cat install | grep -c '^$'
31
13:02:56
#cat install | grep -n '^$'
2:
5:
9:
14:
17:
18:
29:
31:
34:
39:
...
148:
152:
157:
159:
162:
164:
167:
168:
183:
185:
13:03:02
#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
13:05:02
#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/>
13:05:10
#cat install | grep '^[abc]'
apt_get_install_this="perl make libmodule-build-perl libc6-dev gcc"
apt_get_install_deps()
cd ${temp_dir}
cd /
13:06:23
#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