printf 'file1 -int sch%s.inp -HOST all.q:1 -NJOBS 1 -TMPLAUNCHDIR\n' {1..100}
Or:
seq -f 'file1 -int sch%g.inp -HOST all.q:1 -NJOBS 1 -TMPLAUNCHDIR' 100
Or:
jot -w 'file1 -int sch%d.inp -HOST all.q:1 -NJOBS 1 -TMPLAUNCHDIR' 100
Would produce the whole output.
If you wanted to start with that:
file1 -int sch1.inp -HOST all.q:1 -NJOBS 1 -TMPLAUNCHDIR
line in vim, and reproduce it with the second number of the line increased 99 times, you could do qayypw^Aq98@a
with the cursor positioned on that line.
Where:
qa
: starts recording the a
macro
yy
: yanks (copies) the whole line.
p
: pastes it underneath
w
: moves to the next word (to skip the first which does also contain a number).
^A
(Ctrl+A): increments the number under the cursor or if no number under the cursor, the next one found to the right of it.
q
: finish recording the macro
98@a
: run the a
macro 98 times.
Or whenever file1 -int <something><number>.inp
is found at the start of a line, reproduce the line 100 times with the number increased:
perl -pe 'if (m{^file1 -int \S*?\K\d+(?=\.inp)}) {
for my $i ($& .. $& + 99) {
print;
s//$i/;
}
}' < your-file
sch*.inp
things files that exist in the current directory? If so, would you want to run the command for each such file? – Kusalananda Mar 14 '22 at 08:24