Skip to content

Instantly share code, notes, and snippets.

@espio999
espio999 / 42sv2017d01e09.sh
Last active Apr 30, 2022
42 SILICON VALLEY Piscine 2017 Day01 Exercise 09
View 42sv2017d01e09.sh
echo $FT_NBR1 + $FT_NBR2 | sed "s/'/0/g" | tr '\\"?!' 1234 | tr mrdoc 01234 | xargs echo 'obase=13; ibase=5;' | bc | tr 0123456789ABC 'gtaio luSnemf'
@espio999
espio999 / 42sv2017d01e07.sh
Last active Apr 30, 2022
42 SILICON VALLEY Piscine 2017 Day01 Exercise 07
View 42sv2017d01e07.sh
cat /etc/passwd | cut -d ":" -f 1,2,3,4,6,7 | sed -n 2~2p | cut -d":" -f 1 | rev | sort -r | tr [:cntrl:] "," | sed 's/,/, /g' | rev | cut -c 3- | sed 's/^/./' | rev | tr -d [:cntrl:]
@espio999
espio999 / 42sv2017d01e06.sh
Created Apr 29, 2022
42 SILICON VALLEY Piscine 2017 Day01 Exercise 06
View 42sv2017d01e06.sh
ls -l | sed -n 1~2p
@espio999
espio999 / 42sv2017d01e05.sh
Created Apr 29, 2022
42 SILICON VALLEY Piscine 2017 Day01 Exercise 05
View 42sv2017d01e05.sh
str1='"\?$*'
str2="'KwaMe'"
str3='*$?\"'
echo '42' > $stt1$str2$str3
@espio999
espio999 / 42sv2017d01e04.sh
Created Apr 29, 2022
42 SILICON VALLEY Piscine 2017 Day01 Exercise 04
View 42sv2017d01e04.sh
ifconfig -a | grep 'ether' | cut -n 14-31
@espio999
espio999 / 42sv2017d01e03.sh
Created Apr 29, 2022
42 SILICON VALLEY Piscine 2017 Day01 Exercise 03
View 42sv2017d01e03.sh
find . -type f -o -type d | wc -l
@espio999
espio999 / 42sv2017d01e02.sh
Created Apr 29, 2022
42 SILICON VALLEY Piscine 2017 Day01 Exercise 02
View 42sv2017d01e02.sh
find . -name "*.sh" | sed 's/.sh//'
@espio999
espio999 / 42sv2017d01e01.sh
Created Apr 29, 2022
42 SILICON VALLEY Piscine 2017 Day01 Exercise 01
View 42sv2017d01e01.sh
groups $FT_USER | tr [:blank:] "," | tr -d [:cntrl:]
@espio999
espio999 / 42sv2017d00e10.sh
Created Apr 29, 2022
42 SILICON VALLEY Piscine 2017 Day00 Exercise 10
View 42sv2017d00e10.sh
find . \(-path "*~" -a -name "#*" -o -name "*#"\) -print -delete
find . \(-name "*~" -o -name "#*" -o -name "*#"\) -print -delete
@espio999
espio999 / 42sv2017d00e09.sh
Created Apr 29, 2022
42 SILICON VALLEY Piscine 2017 Day00 Exercise 09
View 42sv2017d00e09.sh
patch b sw.diff