Another “sed” one-liner
I needed to generate a comma-delimited, quoted list of all the .svg
image files in a directory, but without the extension.
This worked:
ls -1 ./svgs | sed 's/.*/"&"/' | sed 's/\.svg//' | paste -sd, -
Hooray for the command-line!
(coming soon, why I needed that list…)
Leave a Reply