Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 55 additions & 27 deletions solutions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: echo \"Hello World\""
]
},
{
Expand All @@ -38,7 +38,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: mkdir new_dir"
]
},
{
Expand All @@ -54,7 +54,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: rm -r new_dir/"
]
},
{
Expand All @@ -70,7 +70,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: echo \"Hello World\""
]
},
{
Expand All @@ -86,7 +86,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: mkdir new_dir"
]
},
{
Expand All @@ -102,7 +102,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: rm -r new_dir/"
]
},
{
Expand All @@ -118,7 +118,9 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: \n",
"mkdir lorem-copy\n",
"cp lorem/sed.txt lorem-copy"
]
},
{
Expand All @@ -134,7 +136,16 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: cp lorem/at.txt lorem-copy ; cp lorem/lorem.txt lorem-copy"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Other option: cp lorem/{at.txt,lorem.txt} lorem-copy"
]
},
{
Expand All @@ -150,7 +161,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: cat lorem/sed.txt"
]
},
{
Expand All @@ -166,7 +177,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: cat lorem/{at.txt,lorem.txt}"
]
},
{
Expand All @@ -182,7 +193,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: head --lines=3 lorem-copy/sed.txt"
]
},
{
Expand All @@ -198,7 +209,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: tail --lines=3 lorem-copy/sed.txt"
]
},
{
Expand All @@ -214,7 +225,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: echo \"Homo homini lupus\" >> lorem-copy/sed.txt"
]
},
{
Expand All @@ -230,7 +241,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: tail --lines=3 lorem-copy/sed.txt"
]
},
{
Expand All @@ -246,7 +257,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: sed -i -e 's/et/ET/g' lorem-copy/at.txt"
]
},
{
Expand All @@ -262,7 +273,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: whoami"
]
},
{
Expand All @@ -278,7 +289,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: pwd"
]
},
{
Expand All @@ -294,7 +305,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: cd lorem ; ls *.txt"
]
},
{
Expand All @@ -310,7 +321,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: wc -l lorem/sed.txt"
]
},
{
Expand All @@ -326,7 +337,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: find . -name \"lorem*\" -type f | wc -l"
]
},
{
Expand All @@ -342,7 +353,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: grep --color=always \"et\" lorem/at.txt"
]
},
{
Expand All @@ -358,7 +369,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: grep -o \"et\" lorem/at.txt | wc -l"
]
},
{
Expand All @@ -374,7 +385,24 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: grep -roh -i \"et\" lorem-copy/ | wc -l"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"The command: grep -roh \"et\" lorem-copy/ | wc -l"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# The first one considers the capitalized ET in at.txt (-i ignores case)\n",
"# The second one only considers \"et\""
]
},
{
Expand All @@ -397,7 +425,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: name=\"marc\""
]
},
{
Expand All @@ -413,7 +441,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: echo $name"
]
},
{
Expand All @@ -429,7 +457,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: mkdir $name"
]
},
{
Expand All @@ -445,7 +473,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"The command:"
"The command: rm -r marc/"
]
},
{
Expand Down