10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm a little stuck and would be grateful of some advice!
I have three files, two of which contain reference data that I want to add to a line of output in the third file. I can't seem to get awk to print array contents as I would expect.
The input files are:
# Input file
AAA,OAA,0313... (2 Replies)
Discussion started by: maccas17
2 Replies
2. Shell Programming and Scripting
Hi to everyone,
Please some help over here.
Hi have array a with 6 elements and array b with 3 elements as shown inside BEGIN{} statement.
I need help to get the correct sintax (the part in red) to compare if string from array b is in array a and print the number
related for each match.... (3 Replies)
Discussion started by: Ophiuchus
3 Replies
3. Shell Programming and Scripting
Hi, buddies
I am new to shell scripting and trying to solve a problem. I read about arrays in awk that they are quite powerful and are associative in nature.
Awk Gurus Please help!
I have a file:
Id1 pp1 0t4 pp8 xy2
Id43 009y black
Id6 red xy2
Id12 new pp1 black
I have... (5 Replies)
Discussion started by: geli21
5 Replies
4. Programming
I am not sure where to post this other than here.
I am trying to figure out why an app gives different output when compiled under Ubuntu 10.10 and CentOS 5.5. I am pretty sure that the issue is that the Cent version has gcc 4.1 installed, while Ubuntu has gcc 4.4. I am trying to print from some... (20 Replies)
Discussion started by: LMHmedchem
20 Replies
5. UNIX for Dummies Questions & Answers
Hi to all,
I write this time to ask for different syntax or ways of arrays within awk and uses.
Since I don't know how actually could work and the real potencial of awk arrays, I look for a proactive reply/help in order to get
more information than it seems I'm trying to get.
I think I... (2 Replies)
Discussion started by: cgkmal
2 Replies
6. HP-UX
Hello all!
I have problem in hp-ux 11.11 in awk
I want to grep sar -d 2 1 only 3 column, but have error in awk in hp-ux 11.11
Example:
#echo 123 234 | awk '{print $2}'
123 234
The situattions in commands bdf | awk {print $5}' some...
In hp-ux 11.31 - OK!
How resolve problem (15 Replies)
Discussion started by: ostapv
15 Replies
7. Shell Programming and Scripting
Hi,
I have spent the afternoon trawling Google, Unix.com and Unix in a Nutshell for information on how awk arrays work, and I'm not really getting too far.
I ahve a batch of code that I am pretty sure can be better managed using awk, but I'm not sure how to use awk arrays to do what I'm... (1 Reply)
Discussion started by: littleIdiot
1 Replies
8. Shell Programming and Scripting
Guys,
OK so i have been trying figure this all all day, i guess its a pretty easy way to do it.
Right, so i have to column of data which i have gotten from one huge piece of data. What i would like to do is to put both of these into one array using awk. Is this possible??
If so could... (1 Reply)
Discussion started by: imonthejazz
1 Replies
9. Shell Programming and Scripting
Been struggling with a problem, I have been trying to do this in awk, but am unable to figure this out, I think arrays have to be used, but unsure how to accomplish this.
I have a input file that looks like this:
141;ny;y;g
789;ct;e;e
23;ny;n;u
45;nj;e;u
216;ny;y;u
7;ny;e;e
1456;ny;e;g... (3 Replies)
Discussion started by: craigsky
3 Replies
10. Programming
How to print current date of the Unix system accessing thru C++ program ?
I wrote like this
#include <time.h>
.......
time_t tt;
struct tm *tod;
....
time(&tt);
tod = localtime(&tt);
cout << tod->tm_mon + 1 << "/"
<< tod->tm_mday << "/"
... (6 Replies)
Discussion started by: ls1429
6 Replies