Skip to content
Open
Show file tree
Hide file tree
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
Empty file added example.txt
Empty file.
94 changes: 54 additions & 40 deletions solutions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: echo \"Hello world\""
]
},
{
Expand All @@ -38,7 +38,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: mkdir new_dir"
]
},
{
Expand All @@ -54,7 +54,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: rmdir new_dir"
]
},
{
Expand All @@ -70,7 +70,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: lab-bash emma$ mkdir lorem-copy\n",
" lab-bash emma$ cd lorem\n",
" cp sed.txt ../lorem-copy\n"
]
},
{
Expand All @@ -86,7 +88,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: cp at.txt lorem.txt ../lorem-copy"
]
},
{
Expand All @@ -102,7 +104,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: cat sed.txt"
]
},
{
Expand All @@ -118,7 +120,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: cat at.txt lorem.txt "
]
},
{
Expand All @@ -134,7 +136,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: head -3 sed.txt"
]
},
{
Expand All @@ -150,7 +152,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: tail -3 sed.txt "
]
},
{
Expand All @@ -166,7 +168,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: echo \"Homo homini lupus.\" >> sed.txt "
]
},
{
Expand All @@ -182,7 +184,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: tail -3 sed.txt "
]
},
{
Expand All @@ -198,7 +200,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: sed 's/et/ET/g' at.txt "
]
},
{
Expand All @@ -214,7 +216,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: cd"
]
},
{
Expand All @@ -230,7 +232,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: pwd"
]
},
{
Expand All @@ -246,7 +248,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: ls lorem *txt"
]
},
{
Expand All @@ -262,7 +264,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: wc -l sed.txt "
]
},
{
Expand All @@ -278,7 +280,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: ls -dq *lorem* | wc -l"
]
},
{
Expand All @@ -294,7 +296,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: grep -roh \"et\" . "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"grep \"et\" lorem/at.txt"
]
},
{
Expand All @@ -310,7 +319,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: grep -roh \"et\" . | wc -w"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"grep -c \"et\" lorem/at.txt"
]
},
{
Expand All @@ -326,7 +342,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: grep -roh \"et\" ./lorem-copy | wc -w"
]
},
{
Expand All @@ -349,7 +365,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: name=emmacunill"
]
},
{
Expand All @@ -365,7 +381,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: echo $name"
]
},
{
Expand All @@ -381,7 +397,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: mkdir emmacunill"
]
},
{
Expand All @@ -397,7 +413,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: rmdir emmacunill"
]
},
{
Expand All @@ -417,7 +433,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: for file in lorem/*; do echo \"$file\"; done\n",
" for file in lorem/*; do echo \"${#file}\"; done\n",
" for file in lorem/*; do echo \"$file has ${#file} characters length\"; done"
]
},
{
Expand All @@ -436,7 +454,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: ps -axjf "
]
},
{
Expand All @@ -452,7 +470,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: "
]
},
{
Expand All @@ -468,7 +486,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: alias e=\"echo\"\n",
" alias md=\"mkdir\"\n",
" alias rd=\"rmdir\""
]
},
{
Expand All @@ -484,7 +504,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command: tar czf lorem-compressed.tar.gz lorem lorem-copy"
]
},
{
Expand All @@ -500,7 +520,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command:mkdir lorem-uncompressed\n",
" tar -xvzf lorem-compressed.tar.gz -C lorem-uncompressed"
]
},
{
Expand All @@ -516,7 +537,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The command:"
"The command:mkdir lorem-uncompressed\n",
" tar -xvzf lorem-compressed.tar.gz -C lorem-uncompressed"
]
}
],
Expand All @@ -527,16 +549,8 @@
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.9.6"
},
"nbTranslate": {
"displayLangs": [
Expand Down