From ce5a041f27936d1ff0f179c608810d512ce115c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mu=C3=B1oz?= Date: Mon, 3 Oct 2022 17:46:46 +0200 Subject: [PATCH] Changes to lab bash --- lorem/lorem_copy/at.txt | 10 ++++++ lorem/lorem_copy/lorem.txt | 4 +++ lorem/lorem_copy/sed.txt | 9 ++++++ solutions.ipynb | 62 +++++++++++++++++++++----------------- 4 files changed, 58 insertions(+), 27 deletions(-) create mode 100644 lorem/lorem_copy/at.txt create mode 100644 lorem/lorem_copy/lorem.txt create mode 100644 lorem/lorem_copy/sed.txt diff --git a/lorem/lorem_copy/at.txt b/lorem/lorem_copy/at.txt new file mode 100644 index 0000000..54cf692 --- /dev/null +++ b/lorem/lorem_copy/at.txt @@ -0,0 +1,10 @@ +At vero eos ET accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum +deleniti atque corrupti quos dolores ET quas molestias excepturi sint occaecati cupiditate non +provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum ET dolorum fuga. +Et harum quidem rerum facilis est ET expedita distinctio. +Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod +maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. +Temporibus autem quibusdam ET aut officiis debitis aut rerum necessitatibus saepe eveniet +ut ET voluptates repudiandae sint et molestiae non recusandae. +Itaque earum rerum hic tenETur a sapiente delectus, ut aut reiciendis voluptatibus maiores +alias consequatur aut perferendis doloribus asperiores repellat \ No newline at end of file diff --git a/lorem/lorem_copy/lorem.txt b/lorem/lorem_copy/lorem.txt new file mode 100644 index 0000000..3d79369 --- /dev/null +++ b/lorem/lorem_copy/lorem.txt @@ -0,0 +1,4 @@ +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. +Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/lorem/lorem_copy/sed.txt b/lorem/lorem_copy/sed.txt new file mode 100644 index 0000000..b1e2e19 --- /dev/null +++ b/lorem/lorem_copy/sed.txt @@ -0,0 +1,9 @@ +Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, +totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. +Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, +sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. +Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, +sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. +Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, +nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, +vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?Homo homini lupus. diff --git a/solutions.ipynb b/solutions.ipynb index 10ae56f..da2fe04 100644 --- a/solutions.ipynb +++ b/solutions.ipynb @@ -22,7 +22,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command: echo \"Hello world\"" ] }, { @@ -38,7 +38,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command: mkdir new_dir" ] }, { @@ -54,7 +54,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command: rm-r new_dir" ] }, { @@ -70,7 +70,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:echo \"Hello world\"" ] }, { @@ -86,7 +86,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:mkdir new_dir" ] }, { @@ -102,7 +102,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:rm-r new_dir" ] }, { @@ -118,7 +118,9 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command: mkdir lorem_copy\n", + " cd lorem_copy\n", + " cp sed.txt lorem_copy" ] }, { @@ -134,7 +136,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:cp at.txt ~/lab-bash/lorem/lorem_copy; cp lorem.txt ~/lab-bash/lorem/lorem_copy\n" ] }, { @@ -150,7 +152,8 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:cd ..\n", + " cat sed.txt" ] }, { @@ -166,7 +169,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command: cat at.txt ; cat lorem.txt" ] }, { @@ -182,7 +185,8 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:cd lorem_copy \n", + " head -n 3 sed.txt" ] }, { @@ -198,7 +202,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:tail -n 3 sed.txt" ] }, { @@ -214,7 +218,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command: echo \"Homo homini lupus.\" >> sed.txt" ] }, { @@ -230,7 +234,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command: tail -n 3 sed.txt" ] }, { @@ -246,7 +250,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command: sed -i 's/et/ET/' at.txt\n" ] }, { @@ -262,7 +266,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:whoami" ] }, { @@ -278,7 +282,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:pwd" ] }, { @@ -294,7 +298,8 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:cd ..\n", + " ls *.txt " ] }, { @@ -310,7 +315,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:wc sed.txt" ] }, { @@ -326,7 +331,8 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:cd ..\n", + " find . -name \"lorem*\" -type f | wc -l\n" ] }, { @@ -342,7 +348,8 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:cd lorem\n", + " grep -n et at.txt" ] }, { @@ -358,7 +365,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:grep -c et at.txt\n" ] }, { @@ -374,7 +381,8 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:cd lorem_copy\n", + " grep -c et *txt\n" ] }, { @@ -397,7 +405,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command: name=Carlos" ] }, { @@ -413,7 +421,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:echo $name" ] }, { @@ -429,7 +437,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:mkdir name" ] }, { @@ -445,7 +453,7 @@ "cell_type": "raw", "metadata": {}, "source": [ - "The command:" + "The command:rm -r name" ] }, {