10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i would like to search a variable for a pattern, without having make any calls to external tools.
i have a code like this:
COUNTPRO2="gine is very bad
vine is pretty good"
case "${COUNTPRO2}" in
*vine*)
factor=${COUNTPRO2}
echo $factor
;;
esac
If the variable contains... (7 Replies)
Discussion started by: SkySmart
7 Replies
2. Shell Programming and Scripting
Hi Gurus,
I am trying to convert some lines in a file based on the patter.Below is an example. Text after cn= and uid: should be converted to lower case.
Input:
dn: cn=XXX,ou=111,dc=222,dc=333,dc=444
uid: XXX
userPassword:: aAbVCeDr
dn: cn=XYZ,ou=111,dc=222,dc=333,dc=444
uid: XYZ... (5 Replies)
Discussion started by: Samingla
5 Replies
3. Shell Programming and Scripting
We have a configuration file in Unix. In that we have entries like below. if it ends with ":", then it is the end of record. We need to find our if there is any duplicate entries like ABCD irrespective of the case.
ABCD:\
:conn.retry.stwait=00.00.30:\
:sess.pnode.max=255:\
... (9 Replies)
Discussion started by: johnjs
9 Replies
4. Shell Programming and Scripting
Hi ,
I have the file where i have to search for the pattern. The pattern may be lower case or upper case or camel case. Basically I want to ignore while searching the pattern in awk.
awk '/error|warning/exception/' filename
Please help me (3 Replies)
Discussion started by: arukuku
3 Replies
5. Shell Programming and Scripting
Hi ,
I have writen a scipt and passing one Parameter.
In the scipt i want verify the parameter patteren using Case statement.
exp:
sh script.sh 1213
Code:
i want verify the paramater values as only number not charater.
can you please advise. (2 Replies)
Discussion started by: koti_rama
2 Replies
6. Shell Programming and Scripting
HI,
My file contains data something like
034500,5,B5004946544EB185,DEFAULT,0
Now i want to do a pettern match for DEFAULT and remove that particular line from file and transfer the rest contents to temp file.But my req is i want to do case insensitive matching ie DEFAULT / default.
I... (4 Replies)
Discussion started by: centurion_13
4 Replies
7. UNIX for Dummies Questions & Answers
Using UNIX tools, but not using GAWK (NAWK is OK), is there a more elegant way to achieve this:
sed '
s/_a/_A/1
s/_b/_B/1
s/_c/_C/1
rest of alpahabet
'
I want to change the case of a single character in each string of a text file. The character will be matched by regex '_' and only... (2 Replies)
Discussion started by: uiop44
2 Replies
8. Shell Programming and Scripting
I have a file abc.sh which looks like
qacc1 ----> down
v5c0
check interface v5c1
I want to read this file line by line and perform a certain action if a particular pattern is found in that line. My code so far looks like this:
FileName='abc.sh'
while read LINE
do
echo $LINE
case... (2 Replies)
Discussion started by: lassimanji
2 Replies
9. Shell Programming and Scripting
I am using ksh on a HP Ux. I have a simple script but am having problem with the case statement:-
#!/usr/bin/sh
Chl=”SM.APPLE_SWIFT_DV”
LoConfirm=””
case $chl in
)
LoConfirm=”Using channel at Building 1”
echo “test conditon1”
echo $LoConfirm;;
)
LoConfirm=”Using... (2 Replies)
Discussion started by: gummysweets
2 Replies
10. Shell Programming and Scripting
HELLO ALL,
URGENTLY NEEDED A SCRIPT TO SELECT AND DELETE LOWER AND MIXED CASE RECORDS FROM A COLUMN IN A TABLE.
FOR EXAMPLE : Table name is EMPLOYEE and the column name is CITY
and the CITY column records will be: Newyork
washington
... (1 Reply)
Discussion started by: abhilash mn
1 Replies