Reputation: 1674
I have this file named checkinout100.php and need to copy it to another 100 files following the numbered sequence like checkinout101.php, checkinout102.php and so on until 200.
I've been looking to do it with seq but can't figure it out on my own.
Thanks.
NOTE: Has nothing to do with webpages. It's an Asterisk PBX (Yeastar), I need one of those files per extension (link with hotel software).
Upvotes: 0
Views: 1416
Reputation: 241768
You can use seq
in the following way:
for n in $(seq 101 200) ; do
cp checkinout100.php checkinout$n.php
done
Upvotes: 4