08-28-2013
so what did you try? Here are hints.
-f FILENAME can be used to identify if the file is exist or not.
awk can be used to get the report.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a .csv file
equipment,bandtype
abc,aws
def,mmds
ghi,umts
jkl,mmds
I can get the equipment from `hostname`.
In my script i want to check what is the hostname. then see if it exists in the.csv file. if it does then i want to store the second parameter(bandtype) for the corresponding... (3 Replies)
Discussion started by: lassimanji
3 Replies
2. UNIX for Dummies Questions & Answers
I have a text file where the second column is a list of numbers going from small to large. I want to extract the rows where the second column is smaller than or equal to 0.0001.
My input:
rs10082730 9e-08 12 46002702
rs2544081 1e-07 12 46015487
rs1425136 1e-06 7 35396742
rs2712590... (1 Reply)
Discussion started by: evelibertine
1 Replies
3. UNIX for Dummies Questions & Answers
I have a space delimited text file. I want to extract rows where the third column has 0 as a value and write those rows into a new space delimited text file. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
4. UNIX for Dummies Questions & Answers
Hi Guys,
I am new to shell script.I need your help to write a shell script.
I need to write a shell script to extract data from a .csv file where columns are ',' separated.
The file has 5 columns having values say column 1,column 2.....column 5 as below along with their valuesm.... (1 Reply)
Discussion started by: Vivekit82
1 Replies
5. Linux
I have a .CSV file with the below format:
"column 1","column 2","column 3","column 4","column 5","column 6","column 7","column 8","column 9","column 10
"12310","42324564756","a simple string with a , comma","string with or, without commas","string 1","USD","12","70%","08/01/2013",""... (2 Replies)
Discussion started by: dhruuv369
2 Replies
6. Shell Programming and Scripting
input.csv:
Field1,Field2,Field3,Field4,Field4
abc ,123 ,xyz ,000 ,pqr
mno ,123 ,dfr ,111 ,bbb
output:
Field2,Field4
123 ,000
123 ,111
how to fetch the values of Field4 where Field2='123'
I don't want to fetch the values based on column position. Instead want to... (10 Replies)
Discussion started by: bharathbangalor
10 Replies
7. Shell Programming and Scripting
(14 Replies)
Discussion started by: dhruuv369
14 Replies
8. Linux
cat sample.csv
ID,Name,no
1,AAA,1
2,BBB,1
3,AAA,1
4,BBB,1
cut -d',' -f2 sample.csv | sort | uniq
this gives only the 2nd column values
Name
AAA
BBB
How to I get all the columns of CSV along with this? (1 Reply)
Discussion started by: sanvel
1 Replies
9. Shell Programming and Scripting
Dear All,
I have to solve the following problems with multiple tab-separated text file but I don't know how. Any help would be greatly appreciated. I have access to Linux mint (but not as a professional).
I have multiple tab-delimited files with the following structure:
file1:
1 44
2 ... (5 Replies)
Discussion started by: Bastami
5 Replies
LEARN ABOUT DEBIAN
bb-replog.cgi
BB-REPLOG.CGI(1) General Commands Manual BB-REPLOG.CGI(1)
NAME
bb-replog.cgi - CGI program to report service availability log
SYNOPSIS
bb-replog.cgi
DESCRIPTION
bb-replog.cgi is invoked as a CGI script via the bb-replog.sh CGI wrapper. Based on the parameters it receives, it generates an availabil-
ity report for a specific host-service combination for the requested time-period. The availability report includes a calculation of the
availability percentage (split out on percent green, yellow, red time), and an eventlog for the period listing the status changes that have
occurred to allow for drill-down to the test reports that indicate a problem. Access to the individual historical status logs go via the
hobbitsvc.cgi(1) CGI script.
bb-replog.cgi is passed a QUERY_STRING environment variable with the following parameters:
HOSTSVC (the host and service to report on)
STYLE (report style: "crit", "non-crit", "all")
ST (starttime in seconds since 1-1-1970 00:00 UTC)
END (endtime in seconds since 1-1-1970 00:00 UTC)
The following non-standard parameters are handled by the bbgen version of bb-hist.cgi:
IP (IP address of host - for display purposes only)
REPORTTIME (the REPORTTIME: setting for this host)
WARNPCT (the WARNPCT: setting for this host)
The REPORTTIME and WARNPCT options are taken from the bb-hosts(5) definition for the host, or the defaults are used. These modify the
availability calculation to handle reporting against agreed Service Level Agreements re. the time of day when the service must be avail-
able, and the agreed availability level.
OPTIONS
--env=FILENAME
Loads environment from FILENAME before executing the CGI.
SEE ALSO
bb-hosts(5), hobbitserver.cfg(5), hobbitsvc.cgi(1)
Xymon Version 4.2.3: 4 Feb 2009 BB-REPLOG.CGI(1)