I used the following command to create a list of URLs that I want to test:
echo -e localhost:8080/reports/{promos,promo-updates,scandown}/{130,139,142}{,-unburdened,-burdened}{,.pdf,.xls,.xlsx,.csv,.preload}"\n" >> urls.txt
Unfortunately the URLs appended to urls.txt
each had a space before them (except for the first, of course). I understand why that happened, and I realize I could just strip it off by piping throug a sed
expression, but I'd like to know if there's a way to suppress it instead. (It may seem silly and pedantic, but it's no different than the preference so many people feel for not "abusing cats".)
I tried double-quoting to suppress word-splitting, but that suppressed the brace expansion too, so that was a no-go.
I tried changing IFS to an empty string, but it didn't work either:
IFS='' echo -e localhost:8080/reports/{promos,promo-updates,scandown}/{130,139,142}{,-unburdened,-burdened}{,.pdf,.xls,.xlsx,.csv,.preload}"\n" >> urls.txt
Nor did changing it to a newline:
IFS='\n' echo -e localhost:8080/reports/{promos,promo-updates,scandown}/{130,139,142}{,-unburdened,-burdened}{,.pdf,.xls,.xlsx,.csv,.preload}"\n" >> urls.txt