how to delete nth character in a text file?
is there any method to delete nth character in a text file? I tried searching sed helps but without any result on this. vi might help, but it works in an interactive method, which prevents from processing it automatically.
Any ideas on this will be appreciated. -- Samuel Wu |
You can try something like this
vi -es file_to_be_edited < file_with_vi_commands |
Hi,
Using sed: sed 's/^\(.\{7\}\).\(.*\)/\1\2/' infile Change the 7 into the character position that needs to be deleted. Example: Code:
$ cat infile |
This awk code will delete character at position specified by NUM
Code:
BEGIN { NUM = 13 } |
All times are GMT -5. The time now is 01:27 AM. |