07-17-2018
I give up - don't understand this vague specification and inconsistency between input, logics, and desired output, and thus can't propose anything serious.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a table with 10 columns. Some columns(2nd,4th,5th,7th,8th and 10th) are Not Null columns. I'll get a tab-delimited file and want to check col by col and generate seperate error code for each col eg:102 if 2nd col value is NULL and 104 if 4th col value is NULL so on... I am a... (7 Replies)
Discussion started by: Mandab
7 Replies
2. Shell Programming and Scripting
Hi All,
I have a file which is having 3 columns as (string string integer)
a b 1
x y 2
p k 5
y y 4
.....
.....
Question:
I want get the unique value of column 2 in a sorted way(on column 2) and the sum of the 3rd column of the corresponding rows. e.g the above file should return the... (6 Replies)
Discussion started by: amigarus
6 Replies
3. Shell Programming and Scripting
Hi, my requirement is to sum values in a row.
eg:
input is: sum,value1,value2,value3,.....,value N
Required Output: sum,<summation of N values>
Please help me... (5 Replies)
Discussion started by: MrGopal666
5 Replies
4. Shell Programming and Scripting
Hi All,
I have two sets of files.
Set 1: 100 text files with extension .txt with names like 1.txt, 2.txt, 3.txt until 100.txt
Set 2: One big file with extension .dat
The text files have some records in columns like this:
0.7316431 82628
0.7248189 82577
0.7248182 81369
0.7222999... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
5. UNIX for Dummies Questions & Answers
I want to get count on number of records in a few folders by running grep command for more than two columns in a row of fixed length file.
suppose if i have a fixed length file has 5 columns and I want to see the record counts for country =can and province = bc and time stamp <= 12 feb 2013... (14 Replies)
Discussion started by: princetd001
14 Replies
6. Shell Programming and Scripting
Hello out there,
file.txt:
comp51820_c1_seq1 42 N 0:0:0:0:0:0 1:0:0:0:0:0 0:0:0:0:0:0 3:0:0:0:0:0 0:0:0:0:0:0
comp51820_c1_seq1 43 N 0:0:0:0:0:0 0:1:0:0:0:0 0:0:0:0:0:0 0:3:0:0:0:0 0:0:0:0:0:0
comp51820_c1_seq1 44 N 0:0:4:0:3:1 0:0:1:9:0:0 10:0:0:0:0:0 0:3:3:2:2:6 2:2:2:5:60:3... (16 Replies)
Discussion started by: pathunkathunk
16 Replies
7. UNIX for Dummies Questions & Answers
Hi would like to ask you guys any advise regarding my problem
I have this kind of data
file.txt
111111111,20
111111111,50
222222222,70
333333333,40
444444444,10
444444444,20
I need to get this
file1.txt
111111111,70
222222222,70
333333333,40
444444444,30
using this code I can... (6 Replies)
Discussion started by: reks
6 Replies
8. Shell Programming and Scripting
Hi,
I am a new bie i need some help with respect to shell onliner;
I have data in following format
Name FromDate UntilDate Active Changed Touched
Test 28-03-2013 28-03-2013 1 0.6667 100
Test2 28-03-2013 03-04-2013 ... (1 Reply)
Discussion started by: gangaraju6
1 Replies
9. Shell Programming and Scripting
I have a file (let say file B) like this:
File B:
A1 3 5
A1 7 9
A2 2 5
A3 1 3
The first column defines a filename and the other two define a range in that specific file. In the same directory, I have also three more files (File A1, A2 and A3). Here is 10 sample lines... (3 Replies)
Discussion started by: Bastami
3 Replies
10. Shell Programming and Scripting
Hi Experts,
Please bear with me, i need help
I am learning AWk and stuck up in one issue.
First point : I want to sum up column value for column 7, 9, 11,13 and column15 if rows in column 5 are duplicates.No action to be taken for rows where value in column 5 is unique.
Second point : For... (12 Replies)
Discussion started by: as7951
12 Replies
LEARN ABOUT DEBIAN
bb-csvinfo.cgi
BB-CSVINFO.CGI(1) General Commands Manual BB-CSVINFO.CGI(1)
NAME
bb-csvinfo.cgi - CGI program to show host information from a CSV file
SYNOPSIS
bb-csvinfo.cgi
DESCRIPTION
bb-csvinfo.cgi is invoked as a CGI script via the bb-csvinfo.sh CGI wrapper. Based on the parameters it receives, it searches a comma-
separated file for the matching host, and presents the information found as a table.
bb-csvinfo.cgi is passed a QUERY_STRING environment variable with the following parameters:
key (string to search for, typically hostname)
column (columnnumber to search - default 0)
db (name of the CSV database file in $BBHOME/etc/, default hostinfo.csv)
delimiter (delimiter character for columns, default semi-colon)
CSV files are easily created from e.g. spreadsheets, by exporting them in CSV format. You should have one host per line, with the first
line containing the column headings. Despite their name, the default delimiter for CSV files is the semi-colon - if you need a different
delimiter, invoke bb-csvinfo.cgi with the "delimiter=<character>" in the query string.
Example usage
This example shows how you can use the bb-csvinfo CGI. It assumes you have a CSV-formatted file with information about the hosts stored as
$BBHOME/etc/hostinfo.csv, and the hostname is in the first column of the file.
Use with the bbgen --docurl
The --docurl option to bbgen(1) sets up all of the hostnames on your Xymon webpages to act as links to a CGI script. To invoke the
bb-csvinfo CGI script, run bbgen with the option
--docurl=/cgi-bin/bb-csvinfo.sh?db=hostinfo.csv&key=%s
SEE ALSO
bb-hosts(5), hobbitserver.cfg(5), bbgen(1)
Xymon Version 4.2.3: 4 Feb 2009 BB-CSVINFO.CGI(1)