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
Dear Members,
I have to write a UNIX script (KSH) to create a 6 letter abbreviation from a given string. The string will have alphabets and underscores only.
e.g. abc_pst_xyz is our string and I have to create an abbreviation which will look like 'abpsxy' or 'abcpyz' etc.
Now comes the... (8 Replies)
Discussion started by: Yoodit
8 Replies
4. Shell Programming and Scripting
Hello,
I have 1000 of sql queries and i need to push column value in query. e.g.
SET INSERT_ID=1
INSERT INTO test (id,name) VALUES ('a');
SET INSERT_ID=2
INSERT INTO test (id,name) VALUES ('b');
SET INSERT_ID=3
INSERT INTO test (id,name) VALUES ('c');
SET INSERT_ID=4
INSERT INTO test... (12 Replies)
Discussion started by: mirfan
12 Replies
5. 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
6. Shell Programming and Scripting
Hello,
I am attempting to format the output of my unix ksh script. Currently looks like ...
FTP TO HR : Down
FTP FROM HR 4011a : Up
FTP FROM HR 4019a : Down
FTP FROM HR : Down
Would like the status to be aligned as follows:
... (4 Replies)
Discussion started by: dvella
4 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. UNIX for Dummies Questions & Answers
I have a UNIX shell where:
LEVEL=dev
SITE=here
and WHEREIAM=/tmp/$SITE/location/$LEVEL
I want to echo $WHEREIAM in such a way that I get it back with all the environment variables resolved (/tmp/here/location/dev).
This command will be used in a shell script. (5 Replies)
Discussion started by: zambo
5 Replies
9. AIX
hi ,
i am trying to compre two strings
if ] or if ]
when the length of var1 is small (around 300-400 char ) it works fine
but when it is large (around 900-1000 chars) it fails
is there any limitations for this type of comparison ??? (1 Reply)
Discussion started by: amarnath
1 Replies
10. Shell Programming and Scripting
hi ,
i am trying to compre two strings
if ] or if ]
when the length of var1 is small (around 300-400 char ) it works fine
but when it is large (around 900-1000 chars) it fails
is there any limitations for this type of comparison ??? (3 Replies)
Discussion started by: amarnath
3 Replies