HP3000-L Archives

June 1997, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Andreas Schmidt <[log in to unmask]>
Reply To:
ANDREAS SCHMIDT <[log in to unmask]>
Date:
Mon, 2 Jun 1997 10:52:36 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
> Has anyone used the posix "grep" command on MPE/iX to search for a string
> in a group of MPE files?  We're stumbling on the hfs/MPE file structure
> crossover.
>
> This is potentially very handy for bulk modification projects: we'd like
> grep to identify all the occurances of variables that need to change for
> Y2K source code conversion.
>
> Please reply also if there's a straight forward way to do this using
> common MPE tools.

I wrote a simple script which looks like

#! /bin/sh

# Name : /WEB/DOC/editchg

# Script to change one literal to another for more files
# written by Andreas Schmidt 17JAN95
# imported to HP3000 10FEB97

for file in $(ls -l /SYS/SCHMDA | cut -c64- )
   do
sed s/literal1/literal2/ $file > t
        mv t $file
   done

[/SYS/SCHMIDA is a MPE/iX group containing only "classical" files.]

This may give you an idea ... but you have to invoke the sh.

--

Best regards, Andreas Schmidt
DuPont Information Systems - Europe
C&NS - Computer Technology Europe
DuPont Deutschland GmbH
61343 Bad Homburg, DuPont-Strasse 1, Room 1-346
Phone: 06172-87-2117  Fax -2108   DUCOM x951-2117
eMail: [log in to unmask]
CDC-E HP3000 at http://dew2.nib.dupont.com/webdoc/hp3000/view.cgi

ATOM RSS1 RSS2