AWK:
awk '{print $2}' file.txt
cut:
cut -f2 file.txt
bash:
while read -a A; do echo ${A[1]}; done < file.txt
Perl:
perl -lane 'print $F[1]' file.txt
If you know which line you are using grepping, you can use grep :
grep -o 'sometext12' file.txt
source share