aboutsummaryrefslogtreecommitdiff
path: root/shell01/ex07
diff options
context:
space:
mode:
authorCabergs Charles <cacharle@e-r6-p7.s19.be>2019-07-02 23:44:43 +0200
committerCabergs Charles <cacharle@e-r6-p7.s19.be>2019-07-02 23:44:43 +0200
commitf870cace58c695e417cde3c6f1ae9d3838d83bc3 (patch)
treeda718a1c479f0846d29326c63e925a35c1e9d4ee /shell01/ex07
parent0619a89ac7c9fc5debc3f7c6d2ee348d2d00b58a (diff)
downloadpiscine-f870cace58c695e417cde3c6f1ae9d3838d83bc3.tar.gz
piscine-f870cace58c695e417cde3c6f1ae9d3838d83bc3.tar.bz2
piscine-f870cace58c695e417cde3c6f1ae9d3838d83bc3.zip
c00 start, shell01 ex01 correcion
Diffstat (limited to 'shell01/ex07')
-rwxr-xr-xshell01/ex07/r_dwssap.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/shell01/ex07/r_dwssap.sh b/shell01/ex07/r_dwssap.sh
new file mode 100755
index 0000000..e40a78b
--- /dev/null
+++ b/shell01/ex07/r_dwssap.sh
@@ -0,0 +1 @@
+cat /etc/passwd | sed '/ *#.*/d' | awk 'NR % 2 == 0 { print }' | cut -d : -f 1 | rev | sort -r | awk 'NR >= '$FT_LINE1' && NR <= '$FT_LINE2' { print }' | paste -sd "," - | sed "s/\,/, /g" | sed "s/$/./"