Sponsored Content
Top Forums Shell Programming and Scripting cut - columns with formatted Output Post 302196526 by dhanamurthy on Sunday 18th of May 2008 09:37:36 PM
Old 05-18-2008
cut - output in formatted way

Hi
I got the output as below

$ sed -n '/^*/!d;s/\*\*\*\([A-Z]*\)\([0-9]*\)/\1 \2/p' filename

TEST1 0067*01
TEST2 0081*02
TEST3 0088*03

I need only
TEST1 0067
TEST2 0081
TEST3 0088

and not *01,*02 and *03. I am trying it out.
Meanwhile is there any other simplest way of doing it.

Regards
Dhana
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Formatted output in KSH

Hi, Is there some way to get formatted output in ksh? Something like a properly alligned tabular format. I tried adding '\t' to echo statements, but it doesn't come properly alligned 'hello' A simple Hello 'helloworld' A helloworld statement I need the second coloumn to... (1 Reply)
Discussion started by: psynaps3
1 Replies

2. Shell Programming and Scripting

formatted output with commas

var=12345 echo $var >>>12345 printf "%8.1f \n" $var >>> 12345.0 How to get this as 12,345? I suppose I could break into sections by dividing by 1000 or 1000000. But, is the a trick to this? (4 Replies)
Discussion started by: joeyg
4 Replies

3. Shell Programming and Scripting

Formatted output - awk

Hi I have the following records in a file SABN YOURTUBE 000514 7256 SACN XYOUDSDF 000514 7356 SADN KEHLHRSER 000514 7656 SAEN YOURTUBE 000514 7156 SAFN YOURTUBE 000514 7056 I need to put this in the format like this printf '%s %-50s %6s %-6s\n' I am not going to read individual... (3 Replies)
Discussion started by: dhanamurthy
3 Replies

4. Shell Programming and Scripting

Formatted Output

Hi I have the following lines in a file SWPRC000001NOT STATED 1344 SWPRC000001NOT STATED 1362 SWPRC000001NOT STATED 1418 SWPRC000001NOT STATED 1436 SWPRC000001NOT STATED ... (6 Replies)
Discussion started by: dhanamurthy
6 Replies

5. Shell Programming and Scripting

delete to end of formatted warnings using sed or cut...

hi, i've searched the forums' entries and have tried some of the examples -- to no avial -- this is my first post -- thanks in advance for your help... As part of an installation program -- i'm receiving two(2) extraneous "libcxb WARNING!" statements -- i want to use sed to eliminate the... (12 Replies)
Discussion started by: rickkar
12 Replies

6. Shell Programming and Scripting

output - tab formatted - awk

Dear All, Good Day. I would like to hear your suggestions for the following problem: I have a file with 5 columns with some numbers in 16 lines as shown below. Input file: Col 1 Col 2 Col 3 Col 4 Col 5 12 220 2 121 20 234 30 22 9... (3 Replies)
Discussion started by: Fredrick
3 Replies

7. UNIX for Dummies Questions & Answers

Request for Formatted Output

Can you please tell me how to just get only the output of dealers I & V information along with their subtotals in the next line of the file and create a new file, The dealer position along with corresponding totals may change everyday to any position above or below in the file, please help Thanks (2 Replies)
Discussion started by: Ariean
2 Replies

8. UNIX for Dummies Questions & Answers

Help creating well-formatted columns

Hi all I'm having a few issues with sorting some data into easily-readable columns. Original data in file: Number of visits IP Address 8 244.44.145.122 8 234.45.165.125 6 225.107.26.10 I firstly tried the column -t command which results in this: Number of ... (4 Replies)
Discussion started by: semaj
4 Replies

9. Programming

Formatted output in PERL

Hi Techies, I'm a newbie to PERL, Please help me with following problem. I have an input text file like below cat Input.txt 418673132,P 492538858,P 384535478,P 521522357,I 529435679,I 183617024,P 184414408,I 735510689,P 736238343,I 411642045,I 412690979,I 104232783,I (2 Replies)
Discussion started by: mahi_mayu069
2 Replies

10. Shell Programming and Scripting

Shell Script for formatted output

06/26/2017 23:40:40 CAUAJM_I_10082 06/26/2017 23:40:40 CAUAJM_I_40245 EVENT: CHANGE_STATUS STATUS: STARTING JOB: IOALPPRXXBD_ALPGLGENFAALL MACHINE: aspsun14 06/26/2017 23:40:42 CAUAJM_I_40245 EVENT: CHANGE_STATUS STATUS: RUNNING JOB:... (10 Replies)
Discussion started by: Sandeep Behera
10 Replies
BB-HOSTSVC.CGI(1)					      General Commands Manual						 BB-HOSTSVC.CGI(1)

NAME
hobbitsvc.cgi - CGI program to view Xymon status logs SYNOPSIS
hobbitsvc.cgi [--hobbitd|--historical] [--history={top|bottom}] DESCRIPTION
hobbitsvc.cgi is a CGI program to present a Xymon status log in HTML form (ie, as a web page). It can be used both for the logs showing the current status, and for historical logs from the "histlogs" directory. It is normally invoked as a CGI program, and therefore receives most of the input parameters via the CGI QUERY_STRING environment variable. Unless the "--historical" option is present, the current status log is used. This assumes a QUERY_STRING environment variable of the form HOSTSVC=hostname.servicename where "hostname" is the name of the host with commas instead of dots, and "servicename" is the name of the service (the column name in Xymon). Such links are automatically generated by the bbgen(1) tool when the environment contains "BBLOGSTATUS=dynamic". With the "--historical" option present, a historical logfile is used. This assumes a QUERY_STRING environment variable of the form HOST=hostname&SERVICE=servicename&TIMEBUF=timestamp where "hostname" is the name of the host with commas instead of dots, "servicename" is the name of the service, and "timestamp" is the time of the log. This is automatically generated by the bb-hist.cgi(1) tool. OPTIONS
--hobbitd Retrieve the current status log from hobbitd(1) rather than from the logfile. This is for use with the Xymon daemon from the Xymon monitor version 4. --historical Use a historical logfile instead of the current logfile. --history={top|bottom|none} When showing the current logfile, provide a "HISTORY" button at the top or the bottom of the webpage, or not at all. The default is to put the HISTORY button at the bottom of the page. --env=FILENAME Load the environment from FILENAME before executing the CGI. --templates=DIRECTORY Where to look for the HTML header- and footer-templates used when generating the webpages. Default: $BBHOME/web/ --no-svcid Do not include the HTML tags to identify the hostname/service on the generated web page. Useful is this already happens in the hostsvc_header template file, for instance. --multigraphs=TEST1[,TEST2] This causes hobbitsvc.cgi to generate links to service graphs that are split up into multiple images, with at most 5 graphs per image. This option only works in Xymon mode. If not specified, only the "disk" status is split up this way. --no-disable By default, the info-column page includes a form allowing users to disable and re-enable tests. If your setup uses the default sepa- ration of administration tools into a separate, password- protected area, then use of the disable- and enable-functions requires access to the administration tools. If you prefer to do this only via the dedicated administration page, this option will remove the disable-function from the info page. --no-jsvalidation The disable-function on the info-column page by default uses JavaScript to validate the form before submitting the input to the Xymon server. However, some browsers cannot handle the Javascript code correctly so the form does not work. This option disables the use of Javascript for form-validation, allowing these browsers to use the disable-function. FILES
$BBHOME/web/hostsvc_header HTML template header $BBHOME/web/hostsvc_footer HTML template footer ENVIRONMENT
NONHISTS=info,trends,graphs A comma-separated list of services that does not have meaningful history, e.g. the "info" and "trends" columns. Services listed here do not get a "History" button. TEST2RRD=test,test A comma-separated list of the tests that have an RRD graph. SEE ALSO
xymon(7), hobbitd(1) Xymon Version 4.2.3: 4 Feb 2009 BB-HOSTSVC.CGI(1)
All times are GMT -4. The time now is 04:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy