The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
case insensitive ROOZ Shell Programming and Scripting 4 03-11-2008 12:40 PM
how to make case insensitive checks???? hitmansilentass Shell Programming and Scripting 5 04-30-2007 02:23 PM
awk case-insensitive forever_49ers Shell Programming and Scripting 7 09-13-2006 05:15 PM
Case-insensitive serach with awk acheepi Shell Programming and Scripting 4 07-15-2005 05:58 PM
case insensitive locate davis.ml UNIX for Dummies Questions & Answers 3 11-17-2003 11:14 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-06-2009
vickylife vickylife is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 34
How to make sed case insensitive

I need to remove a pattern say, ABCD whether it is in uppercase or lowercase from a string. How to do it using SED?
for example
ABCDEF should output to EF
abcdEF should also output to EF
  #2 (permalink)  
Old 01-06-2009
Christoph Spohr Christoph Spohr is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 205
Hi,

Code:
sed 's/ABCD//i' file
Should do it.

HTH Chris
  #3 (permalink)  
Old 01-06-2009
frostmourn frostmourn is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 8
sed 's/[Aa][Bb][Cc][Dd]\(..\)/\1/' file
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 On




All times are GMT -4. The time now is 05:19 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-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0