The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Deleting lines inside a file without opening the file toms Shell Programming and Scripting 3 09-24-2007 04:58 AM
Opening a file during FTP ceaker High Level Programming 1 03-31-2006 11:40 PM
Making Changes without opening file irehman Shell Programming and Scripting 9 03-16-2006 06:13 AM
delete file without opening vi lweegp UNIX for Dummies Questions & Answers 7 01-25-2006 10:23 AM
opening a file hiei UNIX for Dummies Questions & Answers 4 03-31-2004 09:24 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-04-2006
Registered User
 

Join Date: Sep 2005
Posts: 78
Stumble this Post!
Unhappy making change in file without opening it

hi everyone
i have script name cs-700kl looking like this
mv klk_ta_01780_023 klk_ta_01780_023_m
tr "[\200-\232]" "[\140-\172]" <klk_ta_01780_023_m> klk_ta_01780_023
i'm running it in sh cs-700kl
i want every time that he will take the value of the end of the file
in this example klk_ta_01780_023 the value 023
and will add this 1 so that the next time he will run klk_ta_01780_024
buy the way
i need to take all the name of the file and change it because if i'll change just the number so when i get to file number 32 he will replace this one
tr "[\200-\232]" "[\140-\172]" too like tr "[\200-\233]" "[\140-\172]"
and i do'nt want it to happend
trying this :
awk '{gsub("klk_ta_01780_023","klk_ta_01780_024" \
); print}' cs-700kl
awk: Syntax error near line 1
awk: illegal statement near line 1
please help
thank's a lot
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:36 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