Article 5S6EW Reading filenames from a bash script

Reading filenames from a bash script

by
Faki
from LinuxQuestions.org on (#5S6EW)
I would like to read the following logfile so I can capture the file names starting from File:

Code:cat /home/flora/logs/9681-T13:17:07.091363777.org
%rec: dynamic

Ptrn: Gnu
File: /home/flora/comint.rc
+ /home/flora/engine.rc
+ /home/flora/playa.rc
+ /home/flora/edva.rc
+ /home/flora/dyna.rc
+ /home/flora/lin.rcHave started to use

Code:while read -r fl; do
echo "$fl" | grep -oE '[/].+'
done < "$logfl"But I want something more substantial, that actually detects the first File: declaration, then proceeds with the remaining files starting with the continuation character +

The loop needs to produce the following

Code:/home/flora/comint.rc
/home/flora/engine.rc
/home/flora/playa.rc
/home/flora/edva.rc
/home/flora/dyna.rc
/home/flora/lin.rclatest?d=yIl2AUoC8zA latest?i=kigaV-riaRc:dTPW3tGBqsY:F7zBnMy latest?i=kigaV-riaRc:dTPW3tGBqsY:V_sGLiP latest?d=qj6IDK7rITs latest?i=kigaV-riaRc:dTPW3tGBqsY:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments