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
Hi,
sry for poor english
I have a group of hex number as : 4D40:4D42
I want so split this group in a list as :
4D40,4D41,4D42
i don't know how i can do this in ksh
Thanks (5 Replies)
Discussion started by: jocazh
5 Replies
3. Shell Programming and Scripting
KSH
HP-SOL-Lin
Cannot use xAWK
I have several strings that are quite long and i want to break them down into smaller substrings.
What I have
String = "word1 word2 word3 word4 .....wordx"
What I want
String1="word1 word2"
String2="word 3 word4"
String3="word4 word5"
Stringx="wordx... (5 Replies)
Discussion started by: nitrobass24
5 Replies
4. Shell Programming and Scripting
Hi,
How to set as variable from sql output.
Query:
select aa.serial, ao.name from ann_amit aa JOIN ann_object ao on (aa.classid=ao.classid);
I got two values from aa.serial and ao.name, I wanna make two different variable for aa.serial and ao.name.
The value of aa.serial should be in... (2 Replies)
Discussion started by: KarthikPS
2 Replies
5. UNIX for Dummies Questions & Answers
Hi Friends ,
I want to know how to format the output for the following:
i searched in the forum and couldnt get the exact requirement.
Thanks in advance . (2 Replies)
Discussion started by: i150371485
2 Replies
6. Shell Programming and Scripting
I have a problem which I would like to solve by using UNIX power and inspired minds around world. Here is the problem
I have a text file and it has data as follows
1X.....................1234567890123456789T1234598765XT1 (header)
1Z01............(sub HEADER)
P100001............
Q1........... (4 Replies)
Discussion started by: ask.chowhan
4 Replies
7. Shell Programming and Scripting
Hi,
I have a file called files.txt which contains data like
http://abc.xyz.com/ghi/klm/nop/qrs/tuv/wxyz/
There are multiple lines like the above in this file.
In .sh script, I would like to read this file, split each line, and store the variable of "qrs" and "wxyz" in separate variables.
... (3 Replies)
Discussion started by: archana.n
3 Replies
8. Shell Programming and Scripting
Hello,
I have a paramter $param consisting just of two literals and want to split it into two parameters, so I can combine it to a new parameter <char1><string><char2>, but the following code didn't work:
tmp_PARAM_1=cut -c1 $PARAM
tmp_PARAM_2=cut -c2 $PARAM... (2 Replies)
Discussion started by: ABE2202
2 Replies
9. Shell Programming and Scripting
Hi,
Is there any way to convert a string into an array in KSH? In other words I want to split the string like this:
STRING="one two three four"
into an array of 4 values splitting on white space. The array should be similar to the one that would be created with the following command:
... (3 Replies)
Discussion started by: piooooter
3 Replies
10. Shell Programming and Scripting
I'm new to unix scripting. How would I go about pulling the first 3 characters from a variable in ksh and storing in another variable? Thanks. (9 Replies)
Discussion started by: steve6368
9 Replies