This file contains 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
#!/bin/sh | |
TIME_A=`date +%s` #A | |
#処理時間を計測したい処理 | |
#sed -e 's/https/taro/g' $1 | |
sed -e 's/http/jiro/g' $1 | |
#sed -e 's/women/chi/g' $1 | |
#sed -e '/https/ s/https/jiro/g ; /http\// s/http\//jiro/g ; /women/ s/women/chi/g' $1 |
This file contains 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
awk | |
複数のファイルに出力する。 | |
特定のカラムを切り出す。 | |
条件によって複数のファイルに出力する。 | |
join | |
複数カラムで結合する。 | |
結合後のカラムの区切りを指定する。 | |
This file contains 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
524 cut -f 1,3,6,7 5432.txt > s5432.txt | |
525 head.exe s5432.txt | |
526 vi s5432.txt | |
527 sort -k 1,1 -k 2,2 -k 3,3 -u s5432.txt > d5432.txt |
This file contains 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
#!/bin/sh | |
#awk '/2012.{4}/{print > "2012_3.txt"};/20130[1-3].{2}/{print > "2013_1.txt"};/20130[4-6].{2}/{print > "2013_2.txt"};/20130[7-9].{2}/{print > "2013_3.txt"}' 2691.txt | |
awk '{print $7}' 2012_3.txt | sort | uniq -c | sort -r > s2012_3.txt | |
awk '{print $7}' 2013_1.txt | sort | uniq -c | sort -r > s2013_1.txt | |
awk '{print $7}' 2013_2.txt | sort | uniq -c | sort -r > s2013_2.txt | |
awk '{print $7}' 2013_3.txt | sort | uniq -c | sort -r > s2013_3.txt |
This file contains 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
join -1 1 -2 1 -o 1.1 1.2 2.2 -t $'\t' <(sort -k 1,1 m.txt) <(sort -k 1,1 inner_L.txt) > h | |
556 join -1 1 -2 1 -o 1.1 1.2 2.2 -t $'\t' <(sort -k 1,1 inner_LL.txt) <(sort -k 1,1 inner_L.txt) > h | |
557 wc h | |
558 head h | |
559 join -1 1 -2 1 -o 1.1 1.2 2.2 -t $'\t' <(sort -k 1,1 h.txt) <(sort -k 1,1 inner_M.txt) > LL_L_M.txt | |
560 join -1 1 -2 1 -o 1.1 1.2 2.2 -t $'\t' <(sort -k 1,1 h) <(sort -k 1,1 inner_M.txt) > LL_L_M.txt | |
561 head.exe LL_L_M.txt | |
562 head.exe inner_LL.txt | |
563 history | |
564 head.exe inner_LL inner_L |
This file contains 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
#!/bin/sh | |
awk '{printf("%s:%s %s %s %s\n", $1, $2, $1, $2, $3);}' file1.txt | sort > sort1 | |
awk '{printf("%s:%s\n", $1, $2);}' file2.txt | sort > sort2 | |
join -1 1 -2 1 -o 1.2,1.3,1.4 sort1 sort2 |
This file contains 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
#!/bin/bash | |
for i in 1 2 3 4 5 6 7 8 9 10 11 12 | |
do | |
awk 'BEGIN{FS=","};NR>=5{if ($5=='$i')print $0};' bookR1.csv > $i.csv | |
array=`awk 'BEGIN{FS=","};{print $1}' $i.csv | uniq` | |
for user in $array; | |
do |
This file contains 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
PRAGMA table_info(table_name); |
This file contains 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
$ yum install gcc-c++ |
This file contains 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
git checkout 8487286 filename.txt |