User Tools

Site Tools


opus:fall2012:kpryslop:part2

Part 2

Entries

Entry 1: October 5, 2012

lab46:~/badname/exercise$ cat one*
lab46:~/badname/exercise$ cat just*
lab46:~/badname/exercise$ cat compress*
lab46:~/badname/exercise$ cat change\ my\\\ name.file
lab46:~/badname/exercise$ cat \*\*\*\ watch\ out\!\ \*\*\*
lab46:~/badname/exercise$ cat \?\?\?\ can\ you\ delete\ me\ \?\?\?.abc
lab46:~/badname/exercise$ cat '#pico28903#'
lab46:~/badname/exercise$ cat '$USER VALUE$'
lab46:~/badname/exercise$ cat '`ls` * HI! *'
lab46:~/badname/challenge$ rm '- challenge round -'
rm: invalid option -- ' '
Try `rm ./'- challenge round -'' to remove the file `- challenge round -'.
Try `rm --help' for more information.
lab46:~/badname/challenge$ rm ./'- challenge round -'
rm: remove regular file `./- challenge round -'? y
lab46:~/badname/challenge$ dir
lab46:~/badname/challenge$ 

Thanks to Dustin Sherburne for all the help.

Entry 2: October 26, 2012

cat spring2013-20121026.html | grep '^<TH CLASS="ddtitle"' | sed 's/^.*crn_in=.....">//g' | sed 's/<\/A><\/TH>$//g' | sed 's/^\(.*\) - \([0-9][0-9][0-9][0-9][0-9]\) - \(.*\) - \([0-9]*\)$/ \3-\4:\2:\1/g' | sort | less

Entry 3: October 30, 2012

Was going to type stuff from yesterday (10/31) doing stuff for the opus but no school.

Entry 4: October 31, 2012

HAPPY HALLOWEEN! Finished the keyword 2. Finished experiment.

cat spring2013-20121026.html | egrep '^(<TH CLASS="ddtitle"|<TD CLASS="dddefault">)' | sed 's/^.*crn_in=.....">//g' | sed 's/<\/A><\/TH>$//g' | sed 's/^\(.*\) - \([0-9][0-9][0-9][0-9][0-9]\) - \(.*\) - \([0-9]*\)$/ \3-\4:\2:\1/g' | sed 's/^.*="dddefault">//g' | sed 's/<\/TD>$//g' | sed 's/^<ABBR title = "To Be Announced">TBA<\/ABBR>//g' | sed 's/^&nbsp;//g' | sed 's/(<ABBR title= "Primary">.........//g' | sed 's/<A HREF=.*//g' | less

Keywords

unix Keyword 2

PATH environment variable

Definition

The $PATH variable specifies a list of one or more directory names separated by colons.

The /bin, /usr, and /local directories are typically included in most users' $PATH settings. The current directory is sometimes included, allowing programs in the current directory to be executed. Superuser (root) accounts as a rule are not include in $PATH, however, in order to prevent the accidental execution of scripts in the current directory.

When a command name is specified by the user or an exec call is made from a program, the system searches through $PATH, examining each directory from left to right in the list, looking for a filename that matches the command name. Once found, the program is executed as a child process of the command shell or program that issued the command.

References

unix Keyword 2 Phase 2

quotes

Definition

A helpful tool that allows you to print characters just as you input them

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

Demonstration

lab46:~$ dir -l | grep "d" | wc -l
19
lab46:~$ 

Experiment 2

Question

Can you give grep to letters/words?

Resources

Hypothesis

It will work and both letters/words.

Experiment

Type it in a command line.

Data

drwxr-xr-x 2 kpryslop lab46       62 Oct 26 15:08 Desktop
drwxr-xr-x 2 kpryslop lab46        6 Jan 25  2011 Documents
lrwxrwxrwx 1 kpryslop lab46       18 Jan 18  2011 Maildir -> /var/mail/kpryslop
drwxr-xr-x 2 kpryslop lab46        6 Jan 25  2011 Music
drwxr-xr-x 2 kpryslop lab46        6 Jan 25  2011 Pictures
drwxr-xr-x 2 kpryslop lab46        6 Jan 25  2011 Public
drwxr-xr-x 2 kpryslop lab46        6 Jan 25  2011 Templates
drwxr-xr-x 2 kpryslop lab46        6 Jan 25  2011 Videos
drwxr-x--x 3 kpryslop lab46       80 Sep 23 11:56 archives
drwxr-x--- 5 kpryslop lab46       51 Sep 17  2010 badname
-rw-r----- 1 kpryslop lab46      971 Oct  5 14:54 badname.tgz
drwxr-xr-x 2 kpryslop lab46        6 Jan 27  2011 bin
drwxr-xr-x 2 kpryslop lab46       42 Sep 21 16:27 closet
lrwxrwxrwx 1 kpryslop lab46       28 Jan 27  2011 data -> /usr/local/etc/data/kpryslop
drwxr-x--- 2 kpryslop lab46       48 Oct 24 15:06 ls\ -l
drwx---r-x 5 kpryslop lab46       45 Oct  5 08:53 public_html
drwx------ 7 kpryslop lab46      101 Sep 26 09:25 src
drwx------ 3 kpryslop lab46       43 Aug 31 15:58 src.bak
drwxr-xr-x 2 kpryslop lab46       21 Sep 21 11:51 the\ answer.txt

Analysis

grep does allow for two or more letters/words.

Conclusions

This is useful to know how to do.

opus/fall2012/kpryslop/part2.txt · Last modified: 2012/12/10 19:16 by kpryslop