caton the syllabus page from the class web site
cat /home/ghoffman/public_html/it244_html/syllabus_it244.htmlScroll back up in your terminal session to see the beginning of the file.
moreon the same file
Enter Enter Enter
touch foo foobar foobletch bletch
ls ble[Tab][Enter][Tab] and [Enter] are not words you type on the command line.
ls foo[Tab][Tab]After the first Tab, you should hear a beep. After the second, all files beginning with "foo" should be displayed.
ls foobl[Tab][Enter]As you supply more letters in the filename, the completion mechanism narrows down the possibilities.
echowith a string argument
echo foo bar bletch
echoto display a system variable
echo SHELL: $SHELL
echo SHELL: SHELL
grep foo foo.txt
grep bar foo.txtNow try the same search with -i
grep -i bar foo.txtNotice that
grepnow prints a new line with the word "Bar" in it.
grepwith the -r option
grep, when used with the -r option, looks in all subdirectories of the directory given to it as its second argument
grep -r foo .The . means the current directory.
grep-v to remove unwanted lines
grepcome from files with the string "svn" in their file names.
greptwice, using a pipe, |, to feed the output of the first invocation of
grepinto the input of the second
grep -r foo . | grep -v svnNotice that all the entries in the subversion files have been removed.
head -1 red_sox.txt
tail -2 red_sox.txt
sorton this file
sort -r fruit.txt
sorton this file without any options
sort numbers.txtSince the numbers from 10 to 19 begin with a 1 they appear before 2
sort -n numbers.txt
sort -nr numbers.txtNote that
sortallows you to combine options after the dash.
echosection up to and including the section called
sortinto this script file.
lesscommands inside ex5.sh
echoStep commands in scripts for the Class Exercise.
~ghoffman/it244_test/ex05.shWhen the script asks if you are ready for more, hit Return or Enter.