I have a scenario where want data to be stored in file in vertical format
below is the data
143|2345|3456|4567|2345|3457|2019-12-28 12:00:01|2019-12-28
After applying my below logic my data is in below format
cat demo.txt |rev| cut -d'|' -f3-|rev|cut -d'|' -f2-
It gives me the required output like below
2345|3456|4567|2345|3457
But now the issue is i want the required output data in vertical format to a text file
like below in file
2345
3456
4567
2345
3457