0
rated 0 times
[
0]
[
0]
/ answers: 1 / hits: 2067
/ 2 Years ago, wed, january 26, 2022, 12:54:01
I am always typing things like this:
cat some_list_of_elements.txt | awk '{print "047"$1"047"}' | paste -d, -s
It takes a list of items from a file, wraps each in quotes, and merges them together in a comma-separated list.
Rather than typing out all that stuff, I'd like to do something like this:
cat some_list_of_elements.txt | csl
How can csl
be implemented in bash? Is there a way to do it as an alias?
More From » bash