input data in a file
Below script is making tabular form perfectly. but there are two thing i am not able to achive
1.how can i color the complete row as red when it see '400' in the row, eg line 3rd from the file.
2 BAD REQUEST have space in between, and because of that BAD is coming in one column and REQUEST is coming in another, how can i get this BAD REQUEST in one column
1. Is it always the same field that needs to be checked (here: field 3)? Then you might try
2. If the line's field separator is the same as the space between the two words, you're out of luck - there's no means to tell between the two. Make sure the producing command/programme/application uses a diferent FS, e.g. a <TAB> char.
Unless the field count is known and fix - then you could count the fields and add any surplus to the status field.
Yes it is the same field that need to be checked. i mean all the lines should come in out put, but the line have 400 in it should be highlighted in red
and wont we have any alternative to fix the space issue.
like if i capture all the four parameters in variable and then can i pass all those variable in such HTML code to achive it?
How do you want to make ANYTHING that reads those lines, be it (shell) read, awk, any text utility, ..., tell the difference between the last and the before last space?
Dear Rudic,
I am not sure how we can do it, but using sed can I omit this space between BAD and REQUEST.
then i will omit the space and take the data in other file and run HTML script on that
If you say there's ONLY those two words possible - NO OTHER multi word status could come up - then of course you can do it in any tool, sed as well as awk as well as ...
Try sub (/BAD REQUEST/, "BAD_REQUEST") in above proposal.
The data in file is limited, either it is ok or bad request.
and how can I use sub (/BAD REQUEST/, "BAD_REQUEST")
you mean I have to use it in HTML code or separately on the file.
Hi,
I need to get the Status Column in Green if it is approved and Red if it is declined in the HTML output attachment#!/bin/bash
body_csv="/authlistener/ProdA/service/queryRS.csv"
body_html="/authlistener/ProdA/service/queryRS.html"
... (1 Reply)
I have a script which converts a .csv file to html nicely. Trying to add 3 colors, green, yellow and red to the output depending upon the values in the cells. Tried some printf command but just can't seem to get any where. Any ideas would be appreciated. nawk 'BEGIN{
FS=","
print ... (7 Replies)
HI Team,
I used below code to get attachment with HTML body. i having21062013.csv file . but i am getting junk .csv file. Can you please help me out.
export MAILTO=rp908@gmail.com.com
export SUBJECT="Test Waiver Code email"
export BODY=test.html
export ATTACH=21062013.csv... (4 Replies)
p1=text1
p2=text2(in red color)
when i am trying to replace $p1 with $p2, content of the file from text2 become red. so when i open that file using vi its showing color code before tex2.
please suggest me how to omit that color code and make content of that file in default color? (1 Reply)
On most of my Sun Blade 100 and Ultra 5 systems running Solaris 9, I am having a problem with my video. The CDE looks fine but as soon as I open up Netscape 7 everything except the browser window changes to very bright and ugly colors. This is happening on multiple freshly installed systems w/... (1 Reply)