I have at least 40 files (20 in xml.
format and 20 in safe.
format).
As example some of this:
iw1-20150612.SAFE.safe
iw2-20150714.SAFE.safe
iw1-20150612.xml
iw2-20150714.xml
I want to put this file names in a txt file in a certain place of text via terminal in Linux (or text is added during this process)
The text can be any as example:
anytext iw1-20150612.SAFE.safe
anytext2 iw1-20150612.xml anytext2 iw1-20150612.xml
anytext Iw2-20150714.SAFE.safe
anytext2 iw2-20150714.xml anytext2 iw2-20150714.xml
Example that I need here:
awk 'NR>1 {print $0}' < ../og/iw1-20150612.SAFE.safe > tmp_file
cat ../og/iw1-20150612.xml tmp_file ../og/m.xml > ./iw1-20150612.xml
awk 'NR>1 {print $0}' < ../og/iw2-20150714.SAFE.safe > tmp_file
cat ../og/iw2-20150714.xml tmp_file ../og/m.xml > ./iw2-20150714.xml
#and etc
It's also important to keep sorting by file name as in the folder. My attempt:
find /any/directory/ -type f -printf "%f\n" >> data.txt
But I don't know how to 'choose a place' to insert text.