10 More Discussions You Might Find Interesting
1. Programming
Can C add its results into an array like bash? For example using bash:
cat /etc/passwd
**truncated for space **
gdm:x:109:118:Gnome Display Manager:/var/lib/gdm:/bin/false
mysql:x:110:122:MySQL Server,,,:/nonexistent:/bin/false
statd:x:111:65534::/var/lib/nfs:/bin/false... (5 Replies)
Discussion started by: metallica1973
5 Replies
2. Shell Programming and Scripting
for a in {1..100}
do
awk '{ sum+=$a} END {print sum}' a=$a file1 > file2
done
I know I will get only one number if following the code above, how can I get 100 sum numbers in file2? (2 Replies)
Discussion started by: wanliushao
2 Replies
3. Shell Programming and Scripting
Requirement 1) I need to execute 15 SQL queries in oracle through linux script. All these query results needs to be stored in array variables.
Requirement 2) And these 15 queries needs to be executed in parallel.
Requirement 3) Once all the queries executed then the shell script should... (3 Replies)
Discussion started by: Niranjancse
3 Replies
4. Shell Programming and Scripting
ok, so here is the issue, I have 2 arrays.
I need to be able to create a loop that will find ${ARRAY1 in the text doc, and replace it with ${ARRAY2 then write the results. I already have that working. The problem is, I need it to do that same result across however many items are in the 2... (2 Replies)
Discussion started by: gentlefury
2 Replies
5. Shell Programming and Scripting
Hi firnds,
I am having two arrays
eg. @a=qw(1 2 3 4) and @b=qw(1 3 6 9)
Now, I want to compare two arrays on first index of both arrays and if they matched, it should output remaining indexes
Pseudo-code
if ($a == $b)
{ print "remaining indexes";}
How can i do this using perl? (1 Reply)
Discussion started by: Renesh
1 Replies
6. Shell Programming and Scripting
Hi, I just wondering if I want to compare previous value to next value if it same count + 1 if not doesn't count how do we compare in Perl? Thank (2 Replies)
Discussion started by: guidely
2 Replies
7. Shell Programming and Scripting
I'm trying to add the paths of all the xml files in certain directories to an array. I want to use the array later in my code. Anyway, for some reason this isn't working. Any help would be appreciated.
Path_Counter=0
for result in "find * -name '*.xml'"; do
XmlPath="$result"
echo... (2 Replies)
Discussion started by: Fly_Moe
2 Replies
8. Shell Programming and Scripting
Hi ,
I am not familiar with shell programming. I have a requirement like i have two files
.I need to compare the two files by comparing each parameter and i should produce 2 outputs.
1)i have around 35 parameters say i have one parameter name called db_name=dcap in one file and... (7 Replies)
Discussion started by: muraliinfy04
7 Replies
9. Shell Programming and Scripting
Hi All
I am going crazy trying to resolve this easy task....
I have a log file that is created by xcode; and it contains the results of a build (either success or fail); what i am trying to achieve here is to get the result from the log, and check if is a pass or fail in an IF statement, so... (3 Replies)
Discussion started by: newbiez
3 Replies
10. Shell Programming and Scripting
Hi
Can anybody tell me how can I dump the results of execution of a command into array form? For example, I want to execute:
and put each part of the result in an array element:
Thanks (2 Replies)
Discussion started by: alirezan
2 Replies