From 1b2f15ec8e09ba0396390f8bf82a05b6b0ad6aba Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Mon, 8 Nov 2021 21:18:55 +0000 Subject: [PATCH] transpose-file --- transpose-file/file.txt | 3 +++ transpose-file/sol.sh | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 transpose-file/file.txt create mode 100755 transpose-file/sol.sh diff --git a/transpose-file/file.txt b/transpose-file/file.txt new file mode 100644 index 0000000..c2d39ae --- /dev/null +++ b/transpose-file/file.txt @@ -0,0 +1,3 @@ +name age +alice 21 +ryan 30 diff --git a/transpose-file/sol.sh b/transpose-file/sol.sh new file mode 100755 index 0000000..d3277e9 --- /dev/null +++ b/transpose-file/sol.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +lines=$(grep -oP '(?