d=db t=table p=partition ALTER TABLE ${d}.${t} SET TBLPROPERTIES('EXTERNAL'='TRUE'); ALTER TABLE ${d}.${t} DROP PARTITION (${p} ''); MSCK REPAIR TABLE ${d}.${t}; https://118k.tistory.com/349 [하이브] 매니지드 테이블과 익스터널 테이블 변경하기 하이브의 테이블은 매니지드(MANAGED) 테이블과 익스터널(EXTERNAL) 테이블 타입이 존재한다. 매니지드 테이블은 테이블을 drop 하면 관리하는 파일도 삭제가 되고, 익스터널 테이블은 파일은 보관된 118k.tistory.com https://stackoverflow.com/questions/46307667..
https://stackoverflow.com/questions/19750653/how-to-append-text-files-using-batch-files How to append text files using batch files How can I append file1 to file2, from a batch file? Text files and only using what is "standard" on windows. stackoverflow.com
#!/bin/bash input=$1 output=$2 rm $output n=0 while read line; do comma="${line//[^,]}" cnt="${#comma}" echo "Line No. ${n} : ${cnt}" >> $output n=$((n+1)) done < ${input} var="text,text,text,text" res="${var//[^,]}" echo "$res" echo "${#res}" ,,, 3 https://stackoverflow.com/questions/16679369/count-occurrences-of-a-char-in-a-string-using-bash Count occurrences of a char in a string using Bash I..