Creating three scripts on “Cygwin terminal”. Please find attachedAttachment
assignment_1__2_.txt

Unformatted Attachment Preview

�� ࡱ �> �� 3 5 ����2��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������y� � � bjbj� � . �{�{ �� �� �� �� � . . . . . ����B B B B N B 1&� b b b b b Q Q Q �% �%�%�%�%�%�%$)(� �*F�% . Q Q Q Q Q �%. . b b ��% � � � Q j. b . b �%� Q �%� � ��#�d%b �����K��j � ����� @$ �% &01&T$ !+� !+(d%!+. d%8Q Q � Q Q Q Q Q �%�%� Q Q Q 1&Q Q Q Q ��������������������������������������������������������������������!+Q Q Q Q Q Q Q Q Q � � : ITEC 325
Fall 2012
Assignment 1
Working individually you are to create three scripts. These scripts will perform the functions described below.
Script 1:
Perform a ls -al on the files within the user’s home directory and save it to a file called ls.dat within your ~ directory
Save the tree information for the /home directory in a file called tree.dat within your ~directory
Create a new directory in your home directory called “backups”
Move the files you just created to the new directory
Rename the files that you just moved to “ls.bu” and “tree.bu”.
Script 2:
Ask the user for their name
Create a file called “daily.dat” within the home directory
Ask the user for a line of text that the system should save to the file
Add to the file the line of text entered by the user
Ask the user for a second line of text that the system should save to the file
Append at the end of the file the line of text entered by the user
Create a copy of the file in the directory “backups” within the home directory, renaming the file daily.bu.
Script 3:
Ask the user for a file’s name
If the file exists, ask them if they would like to (C)opy, (M)ove, or (D)elete it by choosing C, M, or D
If the user chooses C, ask for the destination directory and move it there
If the user chooses M, ask for the destination directory and move it there
If the user chooses D, delete the file.
For Script 3 ensure that the user enters only C, M, or D, warning them about the mistake if they should enter something else.
You will turn in three shell scripts named “Script1.sh”, “Script2.sh”, and “Script3.sh”. Turn in your assignments on BlackBoard.
! � � y z � � � � –
.
8
S
T



Z
[



3 4 � � � � 2
3
[
[ ����Ⱥ���������������������������������������� hK r hK rCJ OJ QJ ^J aJ h5 h5 CJ OJ QJ ^J aJ # h5 h5 5 �CJ OJ QJ ^J aJ h5 CJ OJ QJ ^J aJ h�1�CJ0OJ QJ ^J aJ0 h5 CJ0OJ QJ ^J aJ0 h�^ CJ OJ QJ ^J aJ h�1�CJ OJ QJ ^J aJ . ! � � � z � � –
.
8
T

[

���������������������
&
F d� �7$8$H$gd5
&
F d� �7$8$H$gd5 d� �7$8$H$gd5 $ d� �7$8$H$a$ gd�1�

4 � � 3
[



�����������
&
F d� �7$8$H$gd5 d� �7$8$H$gd5
,1�h ��/ ��=!�� “�� #�� $�� %� �� �� �� j
���������6 6 6 6 6 6 6 6 6 v v v v v v v v v 6 6 6 6 6 6 > 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 �6 6 6 6 6 6 6 6 6 6 �6 6 6 6 6 6 6 6 6 6 6 6 h H 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 � 6 2 � � � � 0 @ P ` p � � � � � � 2 ( � � 0 @ P ` p � � � � � � 0 @ P ` p � � � � � � 0 @ P ` p � � � � � � 0 @ P ` p � � � � � � 0 @ P ` p � � � � � � 0 @ P ` p � � 8 X � V ~ OJ PJ QJ _H mH nH sH tH J`�� J Normal d �� CJ _H aJ mH sH tH DA ���D
Default Paragraph FontRi���R
0 Table Normal � 4�
l4� a�
(k ���(
0 No List @�@ �@ �1� List Paragraph ^�� m$ PK !�� �� [Content_Types].xml���N�0 E�H���-J��@ %�ǎǢ|�ș$ �ز�U��L�TB� l,�3��;�r� �Ø��J��B+$� G]��7O٭V�� $ ���� ����� !)O�^�r�C$�y@���� �/�yH*� � )�޵��߻��UDb�`}”�qۋ�Jח�� �X^�)I`n�E� ��p) � ��li�V[]�1M<�� �� ��O�P��6r�= ���z�gb�I g�� u��S�e b���O����� �R�D۫����qu �g��Z����o~ٺlAp�lx�pT0�� �+[ } `j �����zA��V�2�F���i�@�q�v�֬5|��ʜ̭N��le�X� d s���jcs�� ��7����f���� ��W���+�Ն�7����` � ��g� Ș��J� ��j |��h(�K� �D-�� �� dX� �iJ�؇(��x$(� �:�� ;�˹!� I_�T�� S 1�������?E� � ?������ ?ZBΪm���U/����� �?�~��� �xY����'���y5 �g&΋/����ɋ�>���G �M�Ge���D��� �� 3Vq%’#q� � ���$�8��K ��� ��)f�w 9:ĵ� �
x}r� x ��� �w�� �r�:TZaG�*�y8I�j�bR��c|XŻ� ǿ�I
u3 KG�nD 1� N IB �s���
��R��u���K>V�.E L+M2�#’�f��i ~�V� �vl�{ u8��z� �H�
�*� ��:�( W� ☕
~ ��J��T�eO*�tH G��HY��}KN��P�*ݾ˦�� � TѼ�9/#��A7�qZ� �$*c?� � �qU ��n��w� N �� %��O� �i�4
=3 ��N� ��) cbJ
u�V�4����(Tn���
7�� _?���m-ٛ�{U����B� w��z���n���ʜ”Z ��x��J�Z�� p;����
���{ /� <� P;��,)''K�Q�k5�� �q���pN��8 �K�Gb �e��� �S��d�̛�17 �p�a�>��S R!� ��
3��K4’+�r �zQ
TT��I�� ��I vt]K�c⫲�K#�v�5+�|�� D� �����~ ��O@%w���_�nN[�L��9K����q�� g�V�h�� n
R!�y+� �U�n�;�*&�/H�r ��T�� �>� � >
�t��=.Tġ
� �� S; Z�~ �!����� �P��9gi���C�ڧ! �# B��,��;�X=ۻ,I� 2 U W�V� 9$l�k���= A��j�� �; �{�A�P79�|s*Y��� ��; �̠�[�MC�ۿ �h f��]o��{oY =1k� yV��V����5E8�Vk+֜���8���0X4D)�!!� �?*|f�v�
u����”�x��A�@T_�� � � ��q��6�4)kڬu�V�7�
�t
�’��%;���i�9s�9�x���,��ڎ-45x�d���8?� ǘ�d�/Y|t � � &LI L�J`� & �-G�t�/�� PK !
ѐ�� ‘theme/theme/_rels/themeManager.xml.rels��M
�0 ���w ooӺ �&݈Э� ��5
6?$Q��
�, .�a��i���� c2�1h� :�q��m��@R N��;d�`��o7� g�K(M&$R(.1�r ‘J��ЊT���8��V�”��AȻ�H�u}�� |�$�b {� �P����8 �g/ ]�QAsم (����#��L �[������ PK – !�� �� [Content_Types].xmlPK – !�֧��6
0 _rels/.relsPK – !ky� �� theme/theme/themeManager.xmlPK – !0�C)� � � theme/theme/theme1.xmlPK – !
ѐ�� ‘� theme/theme/_rels/themeManager.xml.relsPK ] �

����

�L � #
� ����@ � ������� � � �0 �( �
� �B
� S
� � � � ? � �� # * j m r u } � P Z ^ :=^ 3 � P �9.�� � � � � � � � � $m �� �� � � � � � � � � �@� � �� � � � � � � � � K �52�N�� � � � � � � � � �b�7 �� � � � � � � � � � /=�Mt� �� � � � � � � � � dS {��� � � � � � � � �
�� ���^�� `���OJ QJ o( �� � �� ���^�� `���OJ QJ ^J o( o �
�p ���^�p `���OJ QJ o( �� �
�@
���^�@
`���OJ QJ o( �� � � ���^� `���OJ QJ ^J o( o �
�� ���^�� `���OJ QJ o( �� �
�� ���^�� `���OJ QJ o( �� � �� ���^�� `���OJ QJ ^J o( o �
�P ���^�P `���OJ QJ o( ��
�� ���^�� `���OJ QJ o( �� � �� ���^�� `���OJ QJ ^J o( o �
�p ���^�p `���OJ QJ o( �� �
�@
���^�@
`���OJ QJ o( �� � � ���^� `���OJ QJ ^J o( o �
�� ���^�� `���OJ QJ o( �� �
�� ���^�� `���OJ QJ o( �� � �� ���^�� `���OJ QJ ^J o( o �
�P ���^�P `���OJ QJ o( �� �� ���^�� `���o( . � �� ���^�� `���OJ QJ ^J o( o �
�p ���^�p `���OJ QJ o( �� �
�@
���^�@
`���OJ QJ o( �� � � ���^� `���OJ QJ ^J o( o �
�� ���^�� `���OJ QJ o( �� �
�� ���^�� `���OJ QJ o( �� � �� ���^�� `���OJ QJ ^J o( o �
�P ���^�P `���OJ QJ o( ��
�� ���^�� `���OJ QJ o( �� �� ���^�� `���OJ QJ ^J o( o �
�p ���^�p `���OJ QJ o( �� �
�@
���^�@
`���OJ QJ o( �� � � ���^� `���OJ QJ ^J o( o �
�� ���^�� `���OJ QJ o( �� �
�� ���^�� `���OJ QJ o( �� � �� ���^�� `���OJ QJ ^J o( o �
�P ���^�P `���OJ QJ o( �� �� ���^�� `��� . � �� ���^�� `��� . � �p �L�^�p `�L� . � �@
���^�@
`��� . � � ���^� `��� . � �� �L�^�� `�L� . � �� ���^�� `��� . � �� ���^�� `��� . � �P �L�^�P `�L� . �� ���^�� `��� . � �� ���^�� `��� . � �p �L�^�p `�L� . � �@
���^�@
`��� . � � ���^� `��� . � �� �L�^�� `�L� . � �� ���^�� `��� . � �� ���^�� `��� . � �P �L�^�P `�L� .
�� ���^�� `���OJ QJ o( �� �� ���^�� `���OJ QJ ^J o( o �
�p ���^�p `���OJ QJ o( �� �
�@
���^�@
`���OJ QJ o( �� � � ���^� `���OJ QJ ^J o( o �
�� ���^�� `���OJ QJ o( �� �
�� ���^�� `���OJ QJ o( �� � �� ���^�� `���OJ QJ ^J o( o �
�P ���^�P `���OJ QJ o( �� dS {K �5$m � P �b�7�@� /=�M������������������������������ �� � �^ 5 K r p��1� G�� ��v� ^ �@� � @�� Unknown�� �� �� ���� �� G � �*�Ax� � Times New Roman5 � �Symbol3.�
�*�Cx� � ArialK� TimesNewRomanPSMT7.� � ���@ � Calibri?=� �*�Cx� � Courier New; � �WingdingsA � � ��$B� Cambria Math” q � �� h �; ��; � �j �
�j
! � � � ����20Y Y K� � �� HX �� $P� ��������������������� G� 2! xx�
��� Bob Eyer csuser( �� �����Oh �� +’��0
p x � � � �
� �
� � Bob Eyer Normal.dotm csuser 2 Microsoft Office Word@@� �j � @� �j � � j …
Purchase answer to see full
attachment