From 89045cb74a6877cb4305539d9d43fc2310d2fdba Mon Sep 17 00:00:00 2001 From: Mo8it Date: Tue, 30 Aug 2022 23:34:59 +0200 Subject: [PATCH] Add last task to day 5 --- day_5/cows_everywhere.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 day_5/cows_everywhere.sh diff --git a/day_5/cows_everywhere.sh b/day_5/cows_everywhere.sh new file mode 100755 index 0000000..d7ebdfe --- /dev/null +++ b/day_5/cows_everywhere.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# Download archive +curl -LO https://codeberg.org/Mo8it/How_To_Linux/archive/main.tar.gz + +# Extract archive +tar -xzvf main.tar.gz + +# Move to the directory that is extracted +cd how_to_linux + +# Replace all 'echo' with 'cowsay' in Markdown files +find . -type f -name "*.md" | xargs sed -i 's/echo/cowsay/g'