FILE PERMISSION

For 2 points

Convert these Octal Value to “Symbolic Value”:

777

rwxrwxrwx

070

---rwx---

123

--x-w--wx

GREP

Do you know that you can also use Regular Expression in grep?

For 2 point

Use grep to find lines in “poems.txt” that satisfies these requirements:

  • Contain this partial string: “ight”
  • The string must end with either; “,” or “;”
  • Also show the line number of the results
grep -n 'ight,\|ight;' poems.txt
## 27:Tyger Tyger, burning bright, 
## 28:In the forests of the night; 
## 52:Tyger Tyger burning bright,

For 2 points

Use grep to find lines in “poems.txt” that satisfies these requirements:

  • Contain the string “the” (how to ensure case insensitive?)
  • Pipe the result to sed and substitute all “the” with “these”
  • Also show the line number of the results
grep -in 'the' poems.txt | sed 's/the/these/g; s/The/These/g'
## 7:Stand in these desert. Near thesem on these sand,
## 11:Which yet survive, stamp'd on thesese lifeless things,
## 12:These hand that mock'd thesem and these heart that fed.
## 13:And on these pedestal thesese words appear:
## 16:Nothing beside remains: round these decay
## 18:These lone and level sands stretch far away. 
## 24:These Tyger
## 28:In these forests of these night; 
## 33:Burnt these fire of thine eyes?
## 35:What these hand, dare seize these fire?
## 38:Could twist these sinews of thy heart?
## 42:What these hammer? what these chain, 
## 44:What these anvil? what dread grasp, 
## 47:When these stars threw down theseir spears 
## 48:And water'd heaven with theseir tears: 
## 50:Did he who made these Lamb make thesee?
## 53:In these forests of these night:

AWK

For 2 points

Use awk to find columns in “nameemailavg.csv” that satisties these requirements:

  • Make sure to use the “,” separator to read in the “csv” file
  • Use Regular Expression to match either “cox.net” or “hotmail”
  • Create two internal variables that says “Are” and “Obsolete”
  • Display the final results in the form: “Name Are Obsolete” (Note: only show the name column and nothing else)
column -s, -t < nameemailavg.csv | awk '/hotmail.com/ || /cox.net/  {print $1 " " $2 " Are Obsolete"}'  
## Lenna Paprocki Are Obsolete
## Donette Foller Are Obsolete
## Leota Dilliard Are Obsolete
## Sage Wieser Are Obsolete
## Graciela Ruta Are Obsolete
## Meaghan Garufi Are Obsolete

A HARD QUESTION

For 2 points

What does LINUX stands for?


Linus Torvald's UNIX