Why am I always sticking my maps in an initialization function that returns the map?
Based on the above, can I do something simple like,
to result in,
or do I have to use something like find() to see if the key is already present?
LMHmedchem
---------- Post updated at 08:25 PM ---------- Previous update was at 07:20 PM ----------
This is what I have at the moment,
This retrieves some data from objects and gives me gives a map,
instead of the old vector, [7, 14, 21, 7, 14, 22], which is correct for the example I'm working on.
Now I need to parse the map back into two vectors, which I think I know how to do. Are there any bear traps in this so far? I tried to pass the map as a pointer, but the receiving function seemed to need to know the size of the map and it wouldn't compile.
Hi Gurus,
I am executing my Datastage jobs on UNIX operating System. While running the jobs i am getting the following error:
main_program: Unexpected termination by Unix signal 9(SIGKILL)
Can any one please let me know what are the possible situations where this SIGKILL will arrise?
... (9 Replies)
i want a shell script program for how many times a word occur in a file.
i need not the line number but i want the counts of the particular word
for eg:-
hai how r u..
i am from andhra pradesh..
i am from tenali.i need this answer.i need it urgently..
i hope u will answer this ...
... (9 Replies)
OS=HP-UX ksh
The following works, except I want to include the <start> and <end> in the output.
awk -F '<start>' 'BEGIN{RS="<end>"; OFS="\n"; ORS=""} {print $2} somefile.log'
The following work in bash but not in ksh
sed -n '/^<start>/,/^<end>/{/LABEL$/!p}' somefile.log (4 Replies)
I have a need to compare 2 files, then print results to file. Need to find items from file2 that are not found in file 1. thanks in advance!
example:
file 1:
abcde=12
fffff=6
bbbb=35
file2:
abcde=12
fffff=6
bbbb=35
ccccc=10
kkkkk=45 (8 Replies)
To find out number of "|" symbol is available in file:
Input:
a|b|c|d|z
Ouput:
4
I am using below set of commands,It is working... Anybody have anyother solution using sed / awk.
cnt=`wc -c <1.txt`
cnt1=`tr -d "|" <1.txt >c.dat`
cnt2=`wc -c <c.dat`
outp=`expr $cnt... (19 Replies)
Hi all,
i create 2 file
Config
path1 5 group1
path2 6 group2
path3 10 group1
path4 15 group2
Confine
group1 andrew
group2 alan
In my C shell script i write like this:
set line_array = (`cat $app_dir/config`)
set line_array_2 =... (0 Replies)
Hello,
I want to only print lines where variables occur more than once using grep.
For eg:
Input:
$this is a comment
int a,b,c,b;
int b,c;
int d,e;
int f,g,f;
x=y+5;
For the above input, the output would be
int a,b,c,b;
int f,g,f;
I have done grep... (3 Replies)
I'm a scripting newbie and I'm trying to learn. No better way than being assigned a project.
So basically, I'm trying to come up with a script that can periodically check a URL and then notify when changes occur to the file.
So what I'm thinking is that I need to devise a PERL script that... (3 Replies)
Hello everyone. Upon reading the recent news about the NSA paying RSA to use a faulty cipher suite for it's default, it got me thinking... During a connection say for SSL, what is it that "knows" the rules for ciphers? Are these rules stored on the NIC? can they be edited, changed or appended? ... (3 Replies)