Last active
July 7, 2018 12:32
-
-
Save greymd/6edbff59405fcf5d4802cdb910587db0 to your computer and use it in GitHub Desktop.
めも:【問題のみ】jus共催 第36回七夕・・・7は素数じゃないですか(しかも2つ)シェル芸勉強会
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Q1: | |
<welcome.txt tr '\0' '*' | fold -w 70 | |
初っ端からひどい | |
Q2: | |
ls | perl -C -Mutf8 -nle 'printf "mv $_ ";$_ =~ tr/0-9/0-9/ ;$_ =~ tr/A-Z/A-Z/;$_ =~ m/([0-9]).*([A-Z])/; print " $1年$2組.doc"' | |
Q3: | |
echo 2018{01..12}{01..31}$'\n' | date -f- +'%Y%m%d' 2>/dev/null | grep -P '([2357].*){4}' | |
Q4: | |
printf 'シェル芸を \n打ったら最後\n最上川 \n' | sed 's/./ &/g' | rs -T | rev | awk '{gsub(".*","s/ /&/");print NR+1$0}' | sed -f- tanzaku | |
Q5: | |
cowsay あなたとJava今すぐダウンロード | perl -nle '$n=length($_); print $_. " " x (47-$n)' | rev | sed 'y/()\/\\/)(\\\//' | sed '2s/.*/echo "& "| rev/e' | |
Q6: | |
seq 20 | factor | sed -r -f <(zsh -c "echo {①..⑳}" | grep -o .| awk NF | awk 'NF{print "/^(.+): \\1$/s/"NR"/"$1"/"}' | tac) | cut -d: -f1 | |
Q7: | |
perl -ple 's/[[:cntrl:]]/ <!-- @{["\\x".unpack("H*",$&)]} --> /g' text | |
Q8: | |
mecab -E@ -F'%m %F-[7]\n'<<<嘘は嘘であると見抜ける人でないと(掲示板を使うのは)難しい|nkf -h1|perl -C -pne's/^(.+?)(.+?) (.+)\2/$1$2 $3@{["@"x length($2)]}/;if(!/^\p{Han}/){s/ .*$//;print"$_ ";s/./@/g}'|rs -T|sed 's/ //g;s/@/ /g;2s/.*/echo &|nkf -h2|nkf -Z4/e'|tac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment