Skip to main content
added 92 characters in body
Source Link
steeldriver
  • 83.8k
  • 12
  • 124
  • 175

With GNU awk (gawk), using FPAT to define a field as a sequence of non-#@ characters:

$ gawk '{$1=$1} 1' FPAT='[^#@]+' OFS='\n' file >> Sequence.txt
$ 
$ tail Sequence.txt 
HelloMyName
IsAdam
NiceToMeetYou

Similar approach, in perl:

perl -lpe '$_ = join "\n", /[^#@]+/g' file >> Sequence.txt

With GNU awk (gawk), using FPAT to define a field as a sequence of non-#@ characters:

$ gawk '{$1=$1} 1' FPAT='[^#@]+' OFS='\n' file >> Sequence.txt
$ 
$ tail Sequence.txt 
HelloMyName
IsAdam
NiceToMeetYou

With GNU awk (gawk), using FPAT to define a field as a sequence of non-#@ characters:

$ gawk '{$1=$1} 1' FPAT='[^#@]+' OFS='\n' file >> Sequence.txt
$ 
$ tail Sequence.txt 
HelloMyName
IsAdam
NiceToMeetYou

Similar approach, in perl:

perl -lpe '$_ = join "\n", /[^#@]+/g' file >> Sequence.txt
Source Link
steeldriver
  • 83.8k
  • 12
  • 124
  • 175

With GNU awk (gawk), using FPAT to define a field as a sequence of non-#@ characters:

$ gawk '{$1=$1} 1' FPAT='[^#@]+' OFS='\n' file >> Sequence.txt
$ 
$ tail Sequence.txt 
HelloMyName
IsAdam
NiceToMeetYou