0

I have 3 files

Original.js
Original.vue
Original.css

How can I easily copy them to

Copy.js
Copy.vue
Copy.css

Until now, i always just copied one by one, but if I could use something like copy Original.* Copy.*, that would be awesome.

I use the fish shell, if that changes anything.

1 Answer 1

3

Using string replace

for file in Original.*
  cp $file (string replace Original Copy $file)
end

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .