-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathlab1-2
29 lines (28 loc) · 1 KB
/
lab1-2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
##### Module 1 #####
#Script started on Sun Apr 19 18:14:54 2015
#[vulfgang@voyager ~]$ ls -l | head -2
#total 44
#lrwxrwxrwx 1 vulfgang unixStudent 33 Apr 11 15:33 CIS18C -> /home/distribution/cnguyen/cis18c
#[vulfgang@voyager ~]$ echo "Found `whoami` among `wc -l /etc/passwd | cut -d' ' -f1` entries of /etc/passwd"
#Found vulfgang among 2002 entries of /etc/passwd
#[vulfgang@voyager ~]$ which ksh
#/bin/ksh
#[vulfgang@voyager ~]$ ls -a | grep -c '^\.'
#11
#[vulfgang@voyager ~]$ cp ~/CIS18C/clean.sed .
#[vulfgang@voyager ~]$ echo 's/^.*$/#&/' >> clean.sed
#[vulfgang@voyager ~]$ exit
#exit
#
#Script done on Sun Apr 19 18:16:35 2015
##### Module 2 #####
#/bin/bash
# by Wolfgang C. Strack
# lab1-2 Module 2: bash shell script
# 19 April 2015
read -p "Please enter the filename: " filename
labdir=/home/distribution/cnguyen/cis18c/labs/Strack_WolfgangC_7355
cp $filename $labdir
echo "$filename has been copied to $labdir"
chmod 707 $labdir/$filename
stat --printf "Access: (%a/%A)\nChange: %z\n" $labdir/$filename