and I want to replace just first occurence of word or number 123456 in this file with XXXXXX and also to save changes into this file.
it will be not always "123456" and the file is much more longer and this numbers are sometimes in the middle of line... so I want the script in generally not just for this example
I was trying it with sed but that command replace one occurence in line but on all lines in document or all occurences in documents...
$sed s/123456/XXXXXX/
or
$sed s/123456/XXXXXX/g
or
$sed s/123456/XXXXXX/1
doesn`t worked for me...
I`m not good in awk or nawk but I read somewhere that it should solve my problem... is here anybody who wants and can help?