dcz,
@dcz@fosstodon.org avatar

#shell #trick with which I surprised greybeards at the local hackerspace (which was surprising cause I'm the opposite of a #bash expert):

mv photo{tocheck,supercool}.jpg

is the same as

mv phototocheck.jpg photosupercool.jpg

The shell copies an argument with {,} inside, and each resulting argument has a different part of what's in {}.

rm plan.{md,svg,png,odt}

Have fun!

#linux #unix #sh #tip

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Bash
  • kavyap
  • thenastyranch
  • GTA5RPClips
  • tester
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • everett
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • cisconetworking
  • megavids
  • khanakhh
  • normalnudes
  • osvaldo12
  • cubers
  • tacticalgear
  • Durango
  • ethstaker
  • modclub
  • anitta
  • provamag3
  • Leos
  • JUstTest
  • lostlight
  • All magazines