June 23, 2017, 10:27:09 PM

News : LinuxSolved.com Linux Help Community Forum..

Author Topic: Output a list of five books with their filename titles into one file  (Read 2265 times)

Offline xcislav

  • New Member
  • Posts: 2
Dear forum of Linux,
could I output a list of five books with their filename titles into one file?
In order o output all the contents of all the files with their filenames there was: find . -type f | while read x; echo -e "\n$x";cat "$x";done > бетховен.txt

In spite of them being successively named 1Atitle... 2Atitle the two first aren't 1A 2A, but 1A ..5A (2
3 4) They actually are: 1АБетховен.. 5АБетховен... It now breaks all things I hoped.

Could the task be done by head, cat or grep command? Cat has no filename parameter, head can't output the whole file and grep has a filename parameter but it's primary use is searching one line. In find I coulnd't write each file by hand ...

i've got another command awk '{ print FILENAME, $0 }' (it claims to show the filename though it shows it didn't end

Currently I blame the Linux learning curve because of google results and non-answered messages and all that after translation if a nice question directly to English. Isn't that it hard to make more help to design unixes language in that way to be really descriptive and write it as you think.
I'm deeply sorry for that grief!...(