OK, sorry.
I have a list of files like this in a folder.
90007-01-11-04Z
90007-01-12-00
90007-01-12-00A
90007-01-13-00
90007-01-13-00A
90007-01-13-00Z
90007-01-14-00
90007-01-14-00A
90007-01-14-00Z
90007-01-15-00A
What I want to do is insert a bit of code at the start of the line, then the file names, followed by a different bit of code.
This is the code that I have so far.
#insert combine script
sed '$a\
\
\
\${combi} all' $EXPATH/combine.tmp > $EXPATH/combine
#search folder for name remove unwanted names, place on same line with awk
ls $EXPATH | grep '^'"$FILE"'.*' | grep -v '_' | grep -v '\.' |
awk '{
printf ("../%s ",$1)
}' >> $EXPATH/combine
sed '$a\
-addclusters -nosyst -top\
' $EXPATH/combine > $EXPATH/combine.tmp
I have so far managed to get all the filenames on the same line, but I can't get the code onto the same line
thanks