10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a ksh script in which I need to fill an array with a list of filenames.
It currently works like this:
set -A array \
val1 \
val2 \
val3However, I was wondering why it's not possible to do something like this to make it easier to parse values to the array:
set -A array... (3 Replies)
Discussion started by: Subbeh
3 Replies
2. Shell Programming and Scripting
Hi,
I am using KSH shell and need to define a multi dimensional array in which i need to store and retrive data. Please provide your valuable in puts.
Eg: asbjkasd 1234
asdhnas 1254
i need to store the above values and use them as input to another command.
Note each line is a pair.
Thanks... (8 Replies)
Discussion started by: hraj1984
8 Replies
3. Shell Programming and Scripting
Hi! I am having a bit of a problem with my script. There are two different date formats that may appear in a file, either Jul-12 or Jul--6. I tried to create an if statement that searches for one of the formats and if that doesn't exist searches for the other, however it doesn't seem to be... (3 Replies)
Discussion started by: ther2000
3 Replies
4. Shell Programming and Scripting
I am trying to use either awk or nawk in ksh88 to grep the word "Reason" in multiple files and than print the lines that say "Reason" in a particular format that is different from how they would normally print. The original input is as follows:
... (10 Replies)
Discussion started by: ther2000
10 Replies
5. Shell Programming and Scripting
Hello everybody!
Why I can export arrays in ksh?
I trie this for exemplo:
In parent script
array=a
array=b
array=c
export array
When I see the variable array in child script there are only first index.
For exemplo in child script
+echo ${array}
a (3 Replies)
Discussion started by: ricardo.ludwig
3 Replies
6. Shell Programming and Scripting
Hi all,
In a loop, i am creating an array of integer and adding it to another array that hold arrays
// psuedo code
pttrnArray=$type$data // This is array of integers.
pttrnArrays=${pttrnArray} // This is supposed to be array of arrays.
But when i print pttrnArrays, i get only the... (1 Reply)
Discussion started by: jakSun8
1 Replies
7. Shell Programming and Scripting
Hello,
First of all, I am trying to duplicate the sum command using ksh/nawk
Lets assume the following algorithms work just fine and there is no calculation errors what so ever (which I doubt at this minute).
For now, I wanna make sure the script uses the BSD algorithim if -r is used... (0 Replies)
Discussion started by: DeltaX
0 Replies
8. Shell Programming and Scripting
Given a line of text in ksh:
string1 string2 string3 .....stringn
is there a way of automatically assigning each string to an array element? Or just different variables would do.
Thanks,
Jon (1 Reply)
Discussion started by: Jonny2Vests
1 Replies
9. Shell Programming and Scripting
hello all.. I have been browsing / searching through the forum and have yet not been able to find what I was looking for.
I am fairly new to ksh and my task is to create a function that reads in an input file:
*****************
2
3
1
abc
def
ghi
/dev/sid/
*****************... (13 Replies)
Discussion started by: sidamin810
13 Replies
10. Shell Programming and Scripting
hello all,
I browsed the forum (briefly) and I am having issues with a script I writing. I need to check a directory and see if there are files there, if so process all of them. The issues I am having is that when I create the array of files names using set -A filenames "$(ls -1... (1 Reply)
Discussion started by: whited05
1 Replies