02-17-2011
But my search string might have a lengthy word too. It might be cumbersome to use all possibilities in the command.
Is there any other way to do this ?
---------- Post updated at 04:58 AM ---------- Previous update was at 04:19 AM ----------
Alternately I found this perl command, that can be used to do case insensitive find and replace. But below perl command does not seem to be working if my search string has the "@" (at the rate) character in it.
perl -pe 's/prodops/productionoperations/i' test_file > test_file_temp
this works.
BUt if my search string is
abc@def.com
and my replace string is
xyz@jki.com, the following command is not working.
perl -pe 's/
abc@def.com/xyz@jki.com/i' test_file > test_file_temp
can anyone help me how to use this perl command to replace some string with "@" character??
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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 Replies)
Discussion started by: vickylife
2 Replies
2. Shell Programming and Scripting
Hi All,
How we can perform case-insensitive search with AWK.:rolleyes:
regards,
Sam (11 Replies)
Discussion started by: sam25
11 Replies
3. Shell Programming and Scripting
Hey , i am trying to do a search for the certain books , and im trying to make it case insensitive. what i have come up with so far is this :
Database.txt
RETARDED MONKEY:RACHEAL ABRAHAML:30:30:20
GOLD:FATIN:23.20:12:3
STUPID:JERLYN:20:40:3
echo -n "Title: "
read Title
echo -n... (3 Replies)
Discussion started by: gregarion
3 Replies
4. UNIX for Dummies Questions & Answers
Hello,
How do I set case insensitive search mode while the file is open with more command ?
(I know -i option which could be used before opening)
thanks
Vilius (2 Replies)
Discussion started by: vilius
2 Replies
5. AIX
Hello,
Linux man command search is case insensitive by default, but not AIX man.
How do I serch case insensitive while using AIX manual pages ?
thanks
Vilius (7 Replies)
Discussion started by: vilius
7 Replies
6. UNIX for Dummies Questions & Answers
I am using HP-Unix B.11.31.
Question: How to do the case insensitive search using FIND?
Example: I would like list the files with extension of *.SQL & *.sql.
When I try with command find . -type f -name *.sql, it does not lists file with *.SQL. (5 Replies)
Discussion started by: Siva SQL
5 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
What is the command to search a file for a case-insensitive match
1.grep -nc text filename
2.grep -i text filename
3.grep -i filename text
4.grep -nc filename text
5.grep -c text filename
Thanks for your help (1 Reply)
Discussion started by: bobby1015
1 Replies
8. Shell Programming and Scripting
I am trying to find case insensitive file names and then replace that particular file with other name.
if
then
ls | grep -i "update" | xargs -I {} mv {} LineItems.csv
echo "File moved from *update*"
elif
then
ls | grep -i "priority" | xargs -I {} mv {} ... (1 Reply)
Discussion started by: ATWC
1 Replies
9. UNIX for Beginners Questions & Answers
Dears,
In the below string, please let me know how to make the sed search case-incensitive. I have more such lines in my script instead of let me know any other easier option.
sed -n '/dn: MSISDN=/,/^\s*$/p' full.ldif > temp ; sed -n... (4 Replies)
Discussion started by: Kamesh G
4 Replies
10. UNIX for Beginners Questions & Answers
Hello ,
Using the below scrip to search a string in a file , by case-insensitively
Please assist on using the toupper() as getting error !.
#!/usr/bin/ksh
set -x
curr_dir=`pwd`
file_ctr=0
printf "\n Reviewing the output file from the directory: %s \n\n" $curr_dir
ls -latr ... (4 Replies)
Discussion started by: Siva SQL
4 Replies
LEARN ABOUT DEBIAN
dep3changelog
DEP3CHANGELOG(1) General Commands Manual DEP3CHANGELOG(1)
NAME
dep3changelog - generate a changelog entry from a DEP3-style patch header
SYNOPSIS
dep3changelog patch [patch ...] [options] [-- [dch_options]]
DESCRIPTION
dep3changelog extracts the DEP3 patch headers from the given patch files and builds a changelog entry for each patch. If the patch author
differs from the one detected from the DEBEMAIL, NAME, DEBEMAIL, or EMAIL environment variables, "Thanks to author <email>" is added to the
changelog entry for that patch. Any bug-debian or bug-ubuntu fields are added as "Closes" to the changelog entry. The generated changelog
entries are passed to debchange as an argument along with the given dch_options.
OPTIONS
--help, -h
Display a help message and exit successfully.
--version
Display version and copyright information and exit successfully.
ENVIRONMENT
DEBEMAIL, EMAIL, DEBFULLNAME, NAME
See the above description of the use of these environment variables.
AUTHOR
Steve Langasek <vorlon@debian.org>
SEE ALSO
debchange(1)
DEBIAN
Debian Utilities DEP3CHANGELOG(1)