Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Batch Text Editing

Intel_C_Intel
Employee
1,133 Views
I am embarrassed to have to ask such a simple question. As a VMS programmer switching over to Windows, I am trying to find a text editor capable of taking line edit commands (locate, delete, replace, insert - that sort of thing) to update a text file via a *.bat file.

The input text file would be generated by one of our own programs and be fine-tuned on the fly for subsequent (batch) application. (Specifically, the input file would be a deck for a finite element program in need of modification prior to use, the user including ancillary structure via lines of text to be included or modified.)
On VMS, the simple EDIT processor was good enough.

I imagined it would be easy to find a suitable windows environment editor. Perhaps my application is too simple - for I am seeking and not finding. There are far more sophisticated applications readily found. Does anyone have a suggestion for this very simple one?
0 Kudos
7 Replies
Steven_L_Intel1
Employee
1,133 Views
What you're looking for is an editor that accepts "editing commands". I don't know of one that is provided by Windows. I'm not familiar with what tools are available, though emacs comes to mind as one possibility.

Steve
0 Kudos
Intel_C_Intel
Employee
1,133 Views
Thanks, Steve,

One of our chaps mentioned a program AWK for which a GNU version exists as freeware under the name "GAWK". This seems to be the ticket. I have downloaded it and am about to try it out. It is a batch oriented pattern recognizing program with the apparent functionality that I need.

Sorry if this seemed a little peripheral (at best) to FORTRAN programming. Our software generates finite element models which sometimes need to be edited on the fly before use. Perhaps others have similar needs.
0 Kudos
Steven_L_Intel1
Employee
1,133 Views
Ah, yes. I had thought about awk, but wasn't familiar enough with it to recommend it.

Steve
0 Kudos
gregscvf
Beginner
1,133 Views
I seem to remember that somewhere on the CVF disk is included an application called STRSUB.exe which may be used to substitute one string with another in a file.
Maybe this could help.
Greg
0 Kudos
cacciatore
Beginner
1,133 Views
KEDIT FOR WINDOWS is a very powerfull text editor, and you can download a demo at www.kedit.com.

Geraldo
0 Kudos
Intel_C_Intel
Employee
1,133 Views
Xemacs claims a (add-on) capability to emulate EDT, so you may want to investigate that as well. I haven't used it though.

Joe
0 Kudos
Intel_C_Intel
Employee
1,133 Views
In addition to awk, which was mentioned earlier, you may want to look into sed and perl. These are Unix utilities, but they have been ported to Windows (see for example www.cygwin.com). You may recognize the s/oldstring/newstring/ syntax. It's strange, but many of the powerful tools one sees today seem to borrow from VMS.

Gabriel
0 Kudos
Reply