write specific line number in file

dear all,

i need your advice

i have sample script like this:
testing.sh

for i in {1..10} 
do  
echo testing $i 
done

but i forgot create "#!/bin/bash" in above "for"
so i want output will like this
testing.sh

#!/bin/bash 
for i in {1..10} 
do  
echo testing $i 
done

how can i do that like output

thx before
RAR

Try:

sed -i '1i#!/bin/bash' testing.sh
1 Like

thx dude @Chubler_XL