i want to write a script that reads lines from file where the line starts with wt^ and p^. i am able to get the wt^ but i am not able to get p^... and there are 20 wt^ with corresponding p^ now i have to get 10 each wt^ with its corresponding p^ in two different files,
how can i do this?
cat $( ls unit-*-slides.txt | sort -n ) | grep "st^" | split -l 200
i have used above code
wt^blah blah
p^blah blah blah blah
p^blah blah blah blah
p^blah blah blah blah
p^blah blah blah blah
p^blah blah blah blah blah blah
p^blah blah blah blah blah blah blah blah
p^blah blah blah blah blah blah
p^blah blah blah blah blah blah
p^blah blah blah blah blah blah