I noticed many files in my directory, called "sedAbCdEf" or such.
/tmp/
?Update:
I checked the scripts until I found one which makes the files. Here is some sample code:
#!/bin/bash
a=1
b=`wc -l < ./file1.txt`
while [ $a -le $b ]; do
for i in `sed -n "$a"p ./file1.txt`; do
for j in `sed -n "$a"p ./file2.txt`; do
sed -i "s/$i/\nZZ$jZZ\n/g" ./file3.txt
c=`grep -c $j file3.txt`
if [ "$c" -ge 1 ]
then
echo $j >> file4.txt
echo "Replaced "$i" with "$j" "$c" times ("$a"/"$b")."
fi
echo $i" not found ("$a"/"$b")."
a=`expr $a + 1`
done
done
done
sed -i "s/$i/\nZZ$jZZ\n/g" ./file3.txt
the -i
option makes sed
stores the stdout output into a temporary file.
After sed
is done, it will rename this temp file to replace your original file3.txt
.
If something is wrong when sed
is running, these sedAbCdE
temp files will be left there.
Your old file is untouched. Usually no.
Yes you can, see above.
Edit: see this for further reading.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With