10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file called "readfile" it contains below parameters
#cat readfile
word=/abc=225,/abc/cba=150 three=12 four=45 five=/xyz/yza
likewise multiple line.
From the above file, I have to read "word"
output should be like,
/abc
/abc/cba
these values need to be put in... (3 Replies)
Discussion started by: munna_dude
3 Replies
2. Shell Programming and Scripting
This basic code works.
I have a very long list, almost 10000 lines that I am building into the array. Each line has either 2 or 3 fields as shown in the code snippit. The array elements are static (for a few reasons that out of scope of this question) the list has to be "built in".
It... (5 Replies)
Discussion started by: sumguy
5 Replies
3. Shell Programming and Scripting
Hi folks,
Sorry for something I'm sure was answered already, I just could not find it in a search of the forums.
I am trying to build a script that eats a config file as:
cat file.cnf | ConProcess.shWhat I want to do inside the script is:
!#/usr/bin/bash
# captured piped cat into an... (6 Replies)
Discussion started by: Marc G
6 Replies
4. Shell Programming and Scripting
I have a line like:
IDNO H1 H2 H3 HT Q1 Q2 Q3 Q4 Q5 M1 M2 EXAM
I would like to be able to access these tokens in such a way:
echo $myline #displays IDNO
Is this possible to do in a shell script? (3 Replies)
Discussion started by: afulldevnull
3 Replies
5. Shell Programming and Scripting
Dear community,
I have to do something too hard for me :rolleyes:. I hope you can help me.
This is an output coming from Oracle query, stored in a file called query.out, there are many rows, but I read them, one by one, using while/read/done. Assuming each row is contained into $line variable... (8 Replies)
Discussion started by: Lord Spectre
8 Replies
6. Programming
Hi,
I want to make 2 simple programs communicate each other with shared memory.
The programs will share an 2D array. In the first program (intarr.c) i create an x array which is:
1 2 3 4
5 6 7 8
9 10 11 12
and i call the second program (intarr2.c) with execvp(); giving it the segment id as an... (2 Replies)
Discussion started by: giampoul
2 Replies
7. Shell Programming and Scripting
Hello,
Can someone please advise me how to put the db2 query reult into an array?
For example, the query reults are:
string A
string B
string C
Then how do I put them into array=string A
array=string B
... (2 Replies)
Discussion started by: hanul
2 Replies
8. Programming
hi,
I have a array like
my $array = ( "apple","ball","cat","dog","elephant");
how to push some element in the array to the first position.
for example my final array should be
elephant apple ball cat dog (5 Replies)
Discussion started by: vprasads
5 Replies
9. Shell Programming and Scripting
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d");
would like to split the @test array into two array:
@test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d");
means search for 3rd filed.
Thanks
find the... (0 Replies)
Discussion started by: jimmy_y
0 Replies
10. Shell Programming and Scripting
Hello,
Is there any way in awk to put every line of a file in an array and so we can like this print the line we want.
For example, if we have this file
aaa eee
bbb fff
ccc ggg
ddd hhh
So we can print to the output the 3rd line only
ccc ggg
If it is possible, please put the... (7 Replies)
Discussion started by: rany1
7 Replies