diff options
| author | Cabergs Charles <cacharle@e-r6-p7.s19.be> | 2019-07-03 10:38:29 +0200 |
|---|---|---|
| committer | Cabergs Charles <cacharle@e-r6-p7.s19.be> | 2019-07-03 10:38:29 +0200 |
| commit | 7a6ae8c6fa665f0c67fe7b4296778026f08764ce (patch) | |
| tree | 67dfc0d4ba9704143b23e78b2976255aa7740df0 /shell01 | |
| parent | f870cace58c695e417cde3c6f1ae9d3838d83bc3 (diff) | |
| download | piscine-7a6ae8c6fa665f0c67fe7b4296778026f08764ce.tar.gz piscine-7a6ae8c6fa665f0c67fe7b4296778026f08764ce.tar.bz2 piscine-7a6ae8c6fa665f0c67fe7b4296778026f08764ce.zip | |
shell01 ex04 corr
Diffstat (limited to 'shell01')
| -rwxr-xr-x | shell01/ex04/MAC.sh | 2 | ||||
| -rwxr-xr-x | shell01/ex07/r_dwssap.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/shell01/ex04/MAC.sh b/shell01/ex04/MAC.sh index 8c5f269..6ba6e55 100755 --- a/shell01/ex04/MAC.sh +++ b/shell01/ex04/MAC.sh @@ -1 +1 @@ -ifconfig -a | grep -E "ether\s([0-9a-f]{2}:){5}[0-9a-f]{2}" | cut -f 1 +ifconfig -a | grep -E "ether\s([0-9a-f]{2}:){5}[0-9a-f]{2}" | sed "s/.*ether //g" | sed "s/ $//g" diff --git a/shell01/ex07/r_dwssap.sh b/shell01/ex07/r_dwssap.sh index e40a78b..158f35e 100755 --- a/shell01/ex07/r_dwssap.sh +++ b/shell01/ex07/r_dwssap.sh @@ -1 +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/$/./" +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/$/./" | tr -d "\n" |
