Split the content of a file in linux Is this: awk -F"@" '{print $1"@"$2"@"}' abc.txt > newfile.txt good enough for you?