"Awk"의 두 판 사이의 차이

ph
이동: 둘러보기, 검색
6번째 줄: 6번째 줄:
 
  \$ cat somefile | awk '{$1=$2=""; print $0}’
 
  \$ cat somefile | awk '{$1=$2=""; print $0}’
 
아래가 더 나은듯
 
아래가 더 나은듯
  awk '{sub($1 FS,"")}7’ YourFile
+
  awk '{sub($1 FS,"")}7' YourFile
 
(스페이스도 없애준다)
 
(스페이스도 없애준다)
 
http://stackoverflow.com/a/31849899/766330
 
http://stackoverflow.com/a/31849899/766330

2017년 5월 8일 (월) 15:37 판

print all but first two columns

\$ # http://stackoverflow.com/a/2961994/766330
\$ cat somefile | awk '{$1=$2=""; print $0}’

아래가 더 나은듯

awk '{sub($1 FS,"")}7' YourFile

(스페이스도 없애준다) http://stackoverflow.com/a/31849899/766330