10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi. I'd like to remove all values in a string variable that also exist in a second variable. What is the appropriate approach to take here? I can use a 'For' loop and check each element and then populate a new string. But is there a cleaner, simpler way?
E.g. I have the following 2 variables ... (19 Replies)
Discussion started by: user052009
19 Replies
2. Shell Programming and Scripting
i have something like this...
echo "teCertificateId" | awk -F'Id' '{ print $1 }' | awk -F'te' '{ print $2 }'
Certifica
the awk should remove 'te' only if it is present at the start of the string.. anywhere else it should ignore it.
expected output is
Certificate (7 Replies)
Discussion started by: vivek d r
7 Replies
3. Shell Programming and Scripting
Hello
Could you help with small script:
How to split string X1 into 3 string
String X1 can have 1 or many strings
X1='A1:B1:C1:D1:A2:B2:C2:D2:A3:B3:C3:D3'
This is output which I want to have:
Z1='A1:B1:C1:D1'
Z2='A2:B2:C2:D2'
Z3='A3:B3:C3:D3' (5 Replies)
Discussion started by: vikus
5 Replies
4. Shell Programming and Scripting
Hi,
I need to convert string "(joe.smith" into "joe_smith"
i.e. I need to remove the leading opening brace '(' and replace the dot '.' with an under score '_'
can anyone suggest a one liner ksh script or unix command for this please (3 Replies)
Discussion started by: sdj
3 Replies
5. Shell Programming and Scripting
Hi Guru's,
I need some help with data manipulation using shell scripting. I know how to replace the whole string but not part of the string.
The value after aa= should be replaced with the value in the mail leaving ,OU=111,OU=222,DC=333 as is. Below are the inputs and expected outputs.
Input:... (17 Replies)
Discussion started by: Samingla
17 Replies
6. Shell Programming and Scripting
Hi,
Could any one share the intelligence to track this problem.
I have any array BT_META_36 and it prints properly with contents of array.
# print "BT_META_36=${BT_META_36}"
# BT_META_36=cab3,cab4:HDS:052,07A cab3,cab4:HDS:052,07A
Now I have a BT_META_36 assigned to a variable.... (0 Replies)
Discussion started by: ajilesh
0 Replies
7. Shell Programming and Scripting
Hi all,
I'm trying to extract the name of a script that is being run with a full path. i.e.
if the script name is /some/where/path/script_name.ksh
I'd like to extract only: script_name
i know that it is possible to do so in two phases:
echo "${0##*/}" will give me script_name.ksh
and... (4 Replies)
Discussion started by: iceman
4 Replies
8. Shell Programming and Scripting
Hello,
I have a korn shell string variable
str1 = "A,B,Z"
I would like to create another korn shell string variable
str2 = "letter = 'A' or letter = 'B' or letter = 'Z' "
Please help!
Thanks in advance
an UNIX newbie! (13 Replies)
Discussion started by: hai1973
13 Replies
9. Shell Programming and Scripting
Hi,
Suppose I have the following text in a file.
ORA-00942: table or view does not exist
ORA-01555: snapshot too old: rollback segment number string with name "string"
too small
Is there any way I can list all the text that starts only with 'ORA-'?
Or there any grep command that can... (7 Replies)
Discussion started by: kakashi_jet
7 Replies
10. Programming
Hi all,
i have the following string as input :
"<iframe src="http://abcdef.com/asd/aaa/awerftya0480000008ave/direct;wi.120;hi.600/01?page=" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" allowtransparency="true" width="120" height="600">
<script... (1 Reply)
Discussion started by: trinath
1 Replies