Compare commits

..

5 Commits

Author SHA1 Message Date
Timo Schmidt b3d21ec94e Extract login name earlier in scripts so it works 2023-03-15 18:52:13 +01:00
Timo Schmidt 017b264464 Make find_sh.sh cleaner 2023-03-15 18:49:26 +01:00
Timo Schmidt 74d0c6955e Make count_files.sh only list regular files and dirs 2023-03-15 18:48:41 +01:00
Timo Schmidt a86d253dad Remove -a flag from MAC.sh, since moulinette won't accept 2023-03-15 18:10:22 +01:00
Timo Schmidt b95e3be972 Add comment about improvment in comment v grepping 2023-03-15 15:49:44 +01:00
4 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,3 @@
#!/bin/sh
find . -type f -name "*.sh" | xargs -I{} basename {} | sed 's/\.sh$//g'
find . -type f -name "*.sh" -exec basename {} .sh \;

View File

@ -1,3 +1,3 @@
#!/bin/sh
find . | wc -l
find . -type f -o -type d | wc -l

View File

@ -1,3 +1,3 @@
#!/bin/sh
ifconfig -a | grep ether | awk '{ print $2 }'
ifconfig | grep ether | awk '{ print $2 }'

View File

@ -1,16 +1,19 @@
#!/bin/sh
# FT_LINE1=7
# FT_LINE2=15
FT_DIFF=$((FT_LINE2 - FT_LINE1 + 1))
cat /etc/passwd |
# Not perfect, will discard line that contain a #
# anywhere in the line, not just the beginning
grep -v '#' |
sed '1d' |
awk 'NR % 2 == 1' |
rev |
sort -r |
rev |
cut -d':' -f1 |
rev |
sort -r |
head -"${FT_LINE2}" |
tail -"${FT_DIFF}" |
tr '\n' ':' |