I would use something like this:
Code:
alias search_and_append {
  var %regex_text = Charlie
  var %file_search = texto.txt
  var %append_text = New Text

  var %read_text = $read(%file_search,r,%regex_text)
  if (%read_text) {
    echo -a Found at line: $readn $+ , appending to line...
    write $+(-l,$readn) %file_search $+(%read_text,$chr(9),%append_text)
  }
  else {
    echo -a Pattern not found, sorry.
  }
}

I used $chr(9) (Tab) as separator (Just because it looks fine).

And here my file texto.txt BEFORE:
Code:
Alfa	6	7
Bravo	5	5
Charlie	4	9
Delta	3	10
Echo	1	2
Foxtrot	2	4

And AFTER using the script:
Code:
Alfa	6	7
Bravo	5	5
Charlie	4	9	New Text
Delta	3	10
Echo	1	2
Foxtrot	2	4

Of course you can use $numtok for watching if all parameters are already in the line (If you don't want to add any other parameter).
You can use regex syntax for searching starts of line:
Code:
^Charlie

And if you want case-insensitive I would use:
Code:
/Charlie/i

And both (maybe what you are searching for, but using tabs as separators):
Code:
/^Charlie\t/i

Last edited by user001; 15/09/11 09:41 PM.