10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the awk I am trying to subtract the difference $3-$2 of each matching $4 before the first _ (underscore) and print that value in $13.
I think the awk will do that, but added comments. What I am not sure off is how to add a line or lines that will add sum each matching $13 value and put it in... (2 Replies)
Discussion started by: cmccabe
2 Replies
2. Shell Programming and Scripting
hello,
i need a bit of help on how to do this effectively in bash without a lot of extra looping or massive switch/case
i have a long array of M elements and a short array of N elements, so M > N always. M is not a multiple of N.
for case 1, I want to stretch N to fit M
arrayHuge
H = (... (2 Replies)
Discussion started by: f77hack
2 Replies
3. Shell Programming and Scripting
Hi,
Can anybody help me in finding the difference between two array elements with the help of code pls.
purge=("Purge Concurrent Request and/or Manager Data" "Purge Signon Audit data" "Purge Obsolete Workflow Runtime Data" "Purge Logs and Closed System Alerts")
purge_1=("Purge Obsolete... (3 Replies)
Discussion started by: Y.balakrishna
3 Replies
4. Shell Programming and Scripting
Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help.
pesudo code
if == ENDSINFIVEINTS ]]; then
do... (4 Replies)
Discussion started by: briandanielz
4 Replies
5. Programming
I think both write at the end of the file ......
but is there a sharp difference between those 2 instruction .....
thank you
this is my 3rd question today forgive me :D (1 Reply)
Discussion started by: fwrlfo
1 Replies
6. Shell Programming and Scripting
Hello
Thanks everyone for the help earlier, what I would like to learn now is how can I achieve the following :
array1 = (1234567,7665456,998889,000909)
array2 = (1234567,5581445,998889,000909)
Result
5581445 doesn't exist on array1
Thank you (6 Replies)
Discussion started by: amlife
6 Replies
7. Shell Programming and Scripting
I have an array and two variables as below,
I need to check if $datevar is present in $filename.
If so, i need to replace $filename with the values in the array.
I need the output inside an ARRAY
How can this be done.
Any help will be appreciated. Thanks in advance. (2 Replies)
Discussion started by: irudayaraj
2 Replies
8. Shell Programming and Scripting
Hi All,
I'm writing a nagios check that will see if our ldap servers are in sync...
I got the status data into a nested array, I would like to search key of each array and if "OK" is NOT present, echo other key=>values in the current array to a variable
so...eg...let take the single array... (1 Reply)
Discussion started by: zeekblack
1 Replies
9. Shell Programming and Scripting
Hi All,
I have a script in which an array is defined. when i run that on Linux box its fine but when i run on SunOS its points to the line where array is defined as below :
syntax error at line 9 : `(' unexpected
array defined as
ID=( ~Hog ~Todd ~Mike )
Thanks in advance (0 Replies)
Discussion started by: ravi.sadani19
0 Replies
10. Programming
I am facing a strange error while creating posix threads:
Given below are two snippets of code, the first one works whereas the second one gives a garbage value in the output.
Snippet 1
This works:
--------------
int *threadids;
threadids = (int *) malloc (num_threads * sizeof(int));
... (4 Replies)
Discussion started by: kmehta
4 Replies