[완료] 파일 내 특정 문자 뒤 부분을 잘라내기 하려면?

foruses의 이미지

123a54
54a343
993a3932
38a2

이 아래처럼 되도록. 즉 a라는 특정 문자 이후의 값을 잘라내려면 어떻게 해야 하나요?

123
54
993
38

ymir의 이미지

$ cat in.txt
123a54
54a343
993a3932
38a2
$ cat in.txt | sed 's/a.*//g'
123
54
993
38
$ cat in.txt | while read -r line; do echo ${line%a*}; done
123
54
993
38
$ cat in.txt | cut -d a -f 1
123
54
993
38

되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』

foruses의 이미지

.