I am trying to create a file that contains all numbers between 1 and 100, each number in a single line, but with all multiples of 7 substituted by 7:
...
12
13
7
15
16
...
My current code is the following, but the sed
command does not work well,
$sudo seq 1 100 | sed -e 's/$?{%7==0}/7/g' > check.txt
How should I write math operations in sed
?