Example 1: Output random String
head -c 65536 /dev/urandom | tr -dc a-zA-Z0-9 | cut -c -16
Example 2: Delete all .jpg files
find . | grep .jpg$ | xargs -I@ rm @
Extra 1: Python
python3 -c "import math;print(math.pi)"
Extra 2: C++
cat<<EOF>a.cpp
#include <bits/stdc++.h>
int main() {
printf("C++ Test
");
}
EOF
g++ a.cpp
./a.out
echo 1
echo "SHELLGEI ONLINE JUDGE"
echo 2
echo -e "SHELLGEI
ONLINE
JUDGE"
echo 3
echo $SHELL
cat 1
cat input.txt
cat 2
cat -n input.txt
cat 3
cat -e input.txt
cat 4
cat input.txt /ShellGeiData/vol.65/input
sed 1
cat input.txt | sed "s/XXX/SHELLGEI/"
sed 2
cat input.txt | sed "s/XXX/SHELLGEI/;s/YYY/ONLINE/"
sed 3
cat input.txt | sed "s/[0-9]//g"
sed 4
cat input.txt | sed "/[0-9]/d"
sed 5
cat input.txt | sed -n "/[0-9]/p"
sed 6
cat input.txt | sed "s/\([a-z]*[0-9]\)/\1.jpg/"
find 1
find "/ShellGeiData/sd201701"
find 2
find "/ShellGeiData/sd201701" -type f
find 3
find "/ShellGeiData/sd201701" -type f -name "dangerous*"
grep 1
cat input.txt | grep ".jpg"
grep 2
cat input.txt | grep -e ".jpg" -e ".png"
grep 3
cat input.txt | grep -v ".txt"
grep 4
cat input.txt | grep ".jpg$"
awk 1
echo | awk "{print "SHELLGEI ONLINE JUDGE"}"
awk 2
cat input.txt | awk "{print $2}"
awk 3
cat input.txt | awk "{print $1,$3,$2}"
awk 4
cat input.txt | awk "BEGIN{cnt=0}{cnt+=1}END{print cnt}"
awk 5
echo | awk "{for(i=1;i<=10;i++){print i}}"
awk 6
cat input.txt | awk "{if($0%2==0){print "EVEN"}else{print "ODD"}}"
sort 1
cat input.txt | sort
sort 2
cat input.txt | sort -r
sort 3
cat input.txt | sort -u
wc 1
cat input.txt | wc -l
wc 2
cat input.txt | wc -w
wc 3
cat input.txt | wc -m
uniq 1
cat input.txt | sort | uniq
uniq 2
cat input.txt | sort | uniq -c
NULL
NULL
NULL
NULL
NULL
NULL
NULL