cd
cd it244
cd ex
mkdir ex6
cd ex6
diff
cd /home/ghoffman/course_files/it244_files
cat numbers1.txt cat numbers2.txt
diff
to compare numbers1.txt and numbers2.txt
diff numbers1.txt numbers2.txtThe output is hard to read, because it contains instructions for the Unix
patch
utility to convert the first file given at the command
line to the second.
diff -y numbers1.txt numbers2.txtThis output is much easier to read.
file
file
on on a shell scriptfile break.sh
file
on a Python scripsfile make_upper.py
cd
file
on the contents of your home directory
file *
file /home/ghoffman/*
cd
cd it244/ex/ex6
pwd
cp /home/ghoffman/course_files/it244_files/red_sox.txt .Make sure you include the dot, ., or you will get an error message.
ls
cat red_sox.txt
grep Win red_sox.txt
grep Win red_sox.txt | grep vsHere, the first instance of grep is the source, and the second is a filter.
grep Win red_sox.txt | grep vs | sort -nrThis is a pipeline, with three separate processes, one for each command.
date
date
date
to show today's date using the format YYYY-MM_DDdate +"%Y-%m-%d"
which
which python3
tar
which tar
whereis
python3
whereis python3Note that
whereis
reveals many more files.
tar
whereis tar
locate
locate foot
who
who
who am i
finger
finger
to see who else is connected to your current host
finger
finger
on your own Unix username
finger YOUR_UNIX_USERNAMEIn place of YOUR_UNIX_USERNAME, you must put your Unix username.
finger
on the username "ghoffman"
finger ghoffman
cd ~/it244/ex/ex6
pwdIf not, see me.
nano ex6.sh
diff
up to and including
finger
.
nano
inside your script.
bash ex6.sh > /dev/nullRunning ex6.sh this way will only print error messages.
~ghoffman/it244_test/ex06.shWhen the script asks if you are ready for more, hit Return or Enter.