Comment

Comment by ara24

As has already been said, bash brace expansion is quite powerful. It has many usecases, such as,

  diff file{.original,}
  mkdir -p path/{a,b,c}/folder
  for i in image{001..060}; do echo $i; done
Parameter Expansion is also equally useful, like changing a few characters in long names,

  mv ${i}.png ${i/imaeg/image}.png
parent ara24 6 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton