04-17-2009
Thanks for your solutions. I have updated the initial question. Any solutions?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi All,
I have been working on awk and arrays. I have this small script:
cat maillog*|awk -F: '$2=="SMTP-Accept" && $5~/string/ {lastdate=substr($1,1,8); internaluser=$5; v++} END {for (j in v) {print lastdate, v, j}'| sort>> mail.list
This gives me the number of mails users are getting. ... (1 Reply)
Discussion started by: nitin
1 Replies
2. 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
3. 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
4. Shell Programming and Scripting
now its owkring - thanks fo rthe help all . (7 Replies)
Discussion started by: fusionX
7 Replies
5. Shell Programming and Scripting
Hi, I've written the following code to manipulate the first 40 lines of a data file into my desired order:
#!/bin/awk -f
{ if (NR<=(4)){
a=a$0" "}
else { if ((NR >= (5)) && (NR <= (13))) {
b=b$0" " }
else {if ((NR >= (14)) && (NR <= (25))){
c=c$0" "}
... (5 Replies)
Discussion started by: catwoman
5 Replies
6. 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
7. UNIX for Dummies Questions & Answers
Hi
Can someone please explain the logic of awk arrays. I have been doing some reading but I dont understand this:
#!/usr/bin/gawk -f
{
arr++;
}
end
{
for(i in arr)
{
print arr,i
}
}
As I understand arr refs the arrays index, so while $2 is a string that cant... (2 Replies)
Discussion started by: chronics
2 Replies
8. 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
9. 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
10. Shell Programming and Scripting
So I'm back once again beating my head off a wall trying to figure out how to get this to work.
My end goal is to take input such as what's below, which will be capture in real time with a tail -f from a file or piped output from another command:
... (5 Replies)
Discussion started by: ShadowBlade72
5 Replies
LEARN ABOUT DEBIAN
qsapecng
QSAPECNG(1) Program Description QSAPECNG(1)
NAME
qsapecng - symbolic analyzer of linear analog circuits
SYNOPSIS
qsapecng
DESCRIPTION
QSapecNG is a Qt-based program for symbolic analysis of linear analog circuits. In fact, it consists of two indipendent parts: the SapecNG
framework engine and the application gui QSapecNG.
It is an open source, multi-platform project, continuously enhanced by students and researchers of the Department of Electronics and
Telecommunications (DET) of the University of Florence. It comes as continuation of SapWin for Windows, in order to give to the project a
full compatibility on other platforms.
Through QSapecNG users can draw, solve and analyze analog circuits as well as manage them. Since version 2.0.0beta1 there is also the full
support for sub-circuits that can be created, saved, reopened and added as part of other circuits.
QSapecNG is freely available on SourceForge <https://sourceforge.net/projects/qsapecng/>.
A previous version of SapecNG is available too, on SourceForge <https://sourceforge.net/projects/sapec-ng/>. Pre-compiled packages will be
also available from projects related pages.
USAGE
TODO (see the website)
COPYRIGHT
Copyright (C) 2009-2011 Michele Caini <michele.caini@gmail.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
THANKS TO
Simone Rossetto <simros85@gmail.com> and his work as a packager.
C. R. Bond <http://www.crbond.com/download/misc/rpoly.cpp> for Jenkins-Traub real polynomial root finder implementation. Source code has
been used as-is, filtered by an adapter function.
Qwt Project <http://qwt.sf.net> for their work. Source code has been used as-is.
Nokia and the not yet supported project QtPropertyBrowser <http://qt.gitorious.org/qt-solutions/qt-
solutions/trees/master/qtpropertybrowser> (on Qt Solutions Archive <http://qt.nokia.com/products/qt-addons/solutions-archive/index> ).
Source code has been used as-is.
Project coordinators are:
- Prof. S. Manetti (who developed last version of SapWin)
- Prof. A. Luchetta <luchetta@unifi.it>
Debian packager and maintainer is Simone Rossetto <simros85@gmail.com>
GNU GPLv3 2011-08-07 QSAPECNG(1)