Need to change i char in a text file

Microsoft Access 2003 (full product)
December 21, 2009 at 18:07:56
Specs: Windows XP
Hi All
Trying to change a text file header the first char is _ and need to change it to a ! any help would be great

See More: Need to change i char in a text file

Report •

December 21, 2009 at 20:21:45
name of example file: test.txt

@echo off & goto :aaa
debug test.txt < %0.bat

this eliminates overhead of having to read/re-write the file
(i think). at any rate, careful test advised (use dummy data).
also assuming the target is not a .exe or otherwise technical file.

(oops, got the swap backwards.. edited to fix)

Report •

December 21, 2009 at 22:00:53
if you can download gawk for windows(my sig)

c:\test> gawk "NR==1 && substr($0,1,1)=="_" {$0=\"!\" substr($0,2)}1" file 

GNU win32 packages | Gawk

Report •

December 21, 2009 at 22:25:19
"well that's pretty good old son, but sit down on that stump ra'ht thar let me show you how it's done.." (charlie daniels,
god bless them!)
good one-liner, i am learning...

Report •

Related Solutions

December 22, 2009 at 14:24:46
Thank you for you answers, saved me a lot of time

Report •

Ask Question