第9回寒中シェル芸勉強会&第27回バナナで釘が打てますUSP友の会定例会

雪の中おつかれさまでした!
6
前へ 1 ・・ 4 5 次へ
石井 久治 @hisaharu

@usptomo 第6問小問1$ perl -e'print "mkdir -p ","a/"x100,"\n"' | bash #シェル芸

2014-02-15 16:04:42
よしこ @yoshiko_pg

できた&潜ってた for i in {0..99}; do mkdir -p a && cd a; done #シェル芸

2014-02-15 16:05:58
石井 久治 @hisaharu

@usptomo 第6問小問2$ perl -e'print "touch ","a/"x100,"b\n"' | bash #シェル芸

2014-02-15 16:06:43
ひっちょん(hichon) @hichon

ちょっと面白い回答が出来てしまった。seq 100|xargs -I@ echo a|xargs -n 100|tr ' ' '/'|xargs mkdir -p #usptomo #シェル芸

2014-02-15 16:08:22
石井 久治 @hisaharu

@usptomo 第6問小問3$ cd $(perl -e'print "a/"x100'); pwd #シェル芸

2014-02-15 16:09:24
tsubok⛅DUBLIN @TSB_KZK

できた! 1~3の複合を1行で。  cd `for i in {1..100}; do echo -n a/; done | xargs -I@ echo "mkdir -p @; touch @b; echo @" | bash` #シェル芸 #usptomo

2014-02-15 16:13:48
th0x0472 @th0x0472

Ustのライブが見られない・・・。録画になってしまう。 #シェル芸 #usptomo

2014-02-15 16:15:44
くんすと@5thの余韻に浸る… @kunst1080

一連 yes a/ | head -100 | tr -d '\n' | awk '{print "mkdir -p",$0, "; cd", $0, ";touch b"}' | sh #シェル芸 #usptomo

2014-02-15 16:17:04
tkt@KIMIKOE&POPIN-Q応援中 @takatayoshitake

底から始めたらこんな感じで #usptomo #シェル芸 for a in {1..50} ; do mv b .. ; cd .. ; done

2014-02-15 16:18:51
石井 久治 @hisaharu

@usptomo 第7問$ perl -e'print "mv ","a/"x100,"b ","a/"x50,"\n"' | bash #シェル芸

2014-02-15 16:19:00
くんすと@5thの余韻に浸る… @kunst1080

こうかな mv `yes a/ | head -100 | tr -d '\n'`b `yes a/ | head -50 | tr -d '\n'`b #シェル芸 #usptomo

2014-02-15 16:20:23
きゃろさん @Carol_815

$ mv $(yes |head -n100 |tr y a |tr '\n' '/')b $(yes |head -n50 |tr y a |tr '\n' '/')b 手抜き #シェル芸 #第7問

2014-02-15 16:21:44
ひっちょん(hichon) @hichon

ちょっと力業で、mv `for d in {1..100};do echo a/;done|tr -d '\n'`b `for d in {1..50};do echo a/;done|tr -d '\n'` #usptomo #シェル芸

2014-02-15 16:22:13
tkt@KIMIKOE&POPIN-Q応援中 @takatayoshitake

一番底から #usptomo #シェル芸 for i in `seq 1 1 100` ; do test -f b && rm b ; test -d a && rmdir a ; cd .. ; done

2014-02-15 16:34:29
上田隆一 @ryuichiueda

今回も無事8問出題しますた。 |【問題集】第9回寒中シェル芸勉強会 http://t.co/cG8OKKs939 @ryuichiuedaさんから #シェル芸 #usptomo

2014-02-15 16:36:10
くんすと@5thの余韻に浸る… @kunst1080

できたー rm `find . -name b` && find . -name a | sort -r | xargs rmdir #シェル芸 #usptomo

2014-02-15 16:36:20
よしこ @yoshiko_pg

bがなければ底からfor i in {1..100}; do cd ../ && rmdir a; done #シェル芸 あるからどうしようー

2014-02-15 16:38:04
ひっちょん(hichon) @hichon

findの-depthオプションが味噌 find a -type f|xargs rm;find a -depth|xargs -n1 rmdir #usptomo #シェル芸

2014-02-15 16:40:22
石井 久治 @hisaharu

@usptomo 第8問$ find | tac | awk '/b/{print "rm",$0} !/b/&&/a/{print "rmdir",$0}' | bash #シェル芸

2014-02-15 16:40:53
前へ 1 ・・ 4 5 次へ