D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG]Re: writing shell scripts

 

P.S.

I've hacked together (with the help of a code generator) an example here: https://gist.github.com/tsak/2b323c4c5330ed2b4ed89ecb540be429

It takes a CSV file as an input (as you said you want to add some text to the URL too), reads the file, gets the first URL and text, then shells out to a program (just bash in this example) and then rewrites the CSV with the first entry removed.

I tested it on my Pihole and it ran without problem.

Cheers,
Oliver
-- 
The Mailing List for the Devon & Cornwall LUG
FAQ: https://www.dcglug.org.uk/faq/