Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
めも:【問題のみ】jus共催 第36回七夕・・・7は素数じゃないですか(しかも2つ)シェル芸勉強会
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
You can’t perform that action at this time.