The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
grep a string from 2 text files karthikn7974 Shell Programming and Scripting 15 04-24-2008 12:15 AM
text substitution yakari Shell Programming and Scripting 3 03-07-2008 06:33 AM
string substitution laxmi Shell Programming and Scripting 3 02-16-2008 02:11 AM
String Substitution laxmi UNIX for Advanced & Expert Users 1 02-16-2008 02:08 AM
Sed String Substitution pciatto UNIX for Dummies Questions & Answers 2 04-29-2002 07:10 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-16-2001
Registered User
 

Join Date: Apr 2001
Posts: 25
Stumble this Post!
Question Update text files in place (string substitution) ??

The auditors have nailed us for world writeable files....

Apparently in years gone by, quite a number of our kornshell scripts have had:
umask 000 put in the script.

We have been able to turn off world writeable for existing dirs & files, but as these scripts run, new files keep getting created.

I used a utility many years ago which would do a string substitution within a series of files.
I would like to unilaterally comment out all umask commands within all of our scripts without having to modify them 1 at a time.

Running under Sun Solaris 7.

Any ideas out there?
Forum Sponsor
  #2 (permalink)  
Old 07-16-2001
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,295
Stumble this Post!
Lightbulb PERL

I've had to do similar things a number of times. Each time I use a simple one line PERL command.

I think an example is in the forums database and a key word search might find it. Here is one particular thread:

find pattern in FILES and replace it ??
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0