Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google site



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 !!

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-02-2007
Registered User
 

Join Date: Jun 2007
Posts: 18
Lightbulb how to write perl substitute command in shell scripts

How to write perl substitute command in shell script without invoking a perl script file seperately.

for ex:

shell script to relace IT with CSC in a file using perl substitute command.
Sponsored Links
  #2 (permalink)  
Old 07-02-2007
kamitsin's Avatar
Registered User
 

Join Date: Nov 2006
Location: /dev/null
Posts: 177

Code:

#!/bin/ksh
/usr/bin/perl -i -pe 's/IT/CSC/g'

Just out of curiosity, why do you want to do this? You can do this easily with sed !!
  #3 (permalink)  
Old 07-02-2007
Shell_Life's Avatar
Registered User
 

Join Date: Mar 2007
Location: Bahia, Brazil
Posts: 695
Kamitsin,
It smells like homework.
  #4 (permalink)  
Old 07-03-2007
Registered User
 

Join Date: Jun 2007
Posts: 18
i need to replace the string in unix file.
On opening the same file am getting line too long error. So using sed will not work.

Thanks for ur reply
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
perl vs shell scripts JamesByars Shell Programming and Scripting 7 01-15-2008 03:38 PM
Problem with cat with PERL Substitute jingi1234 UNIX for Advanced & Expert Users 2 03-23-2007 04:11 AM
what's the debug command for perl scripts dayanandra Shell Programming and Scripting 2 05-19-2006 05:21 PM
Learning to write UNIX Shell Scripts VENC22 UNIX for Dummies Questions & Answers 1 04-29-2005 09:03 AM
Urgent!! How to write a shell program to execute command to access internet? firebirdonfire UNIX for Dummies Questions & Answers 2 04-26-2001 12:16 PM



All times are GMT -4. The time now is 09:41 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0