Hi,
I have a file with 3 lines like
aaaabb
abcdef
wertyu
now i want to insert a new character "Q" in the 3rd position of every line of the file....
I found a way to do it but i felt it is little complex. Do you guys have any ideas
Hi,
I have a file with 3 lines like
aaaabb
abcdef
wertyu
now i want to insert a new character "Q" in the 3rd position of every line of the file....
I found a way to do it but i felt it is little complex. Do you guys have any ideas
just curious - what you've come up with?
hmmm
cut -c 1-2 filename.txt > newfile1.txt
cat newfile1.txt | while read line
do
sed '$line/${line}a/g'
done >> newfile.txt
paste newfile1.txt newfile.txt
I know this is crude way of doing it. so any views??
echo 'abcdef' | sed 's/^../&Q/'
that is working !! thanks