Text formating issue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Text formating issue
# 1  
Old 01-08-2010
Text formating issue

Hi,
I am trying to format the output of my script in a tabular format
using the html code in my shell script.

I am using html code for the first time in a shell script.I am trying to execute this script in Ksh but it is not getting executed.

Can you please help me in figuring this out.
Thanks in anticipation.

Regards
Isaac

Last edited by radoulov; 01-08-2010 at 06:26 AM..
# 2  
Old 01-08-2010
could you please open the lid of your box so that we can see the script?
# 3  
Old 01-08-2010
Hi

it would be helpful if u could throw some more light on ur problem Smilie

cheers
# 4  
Old 01-08-2010
Given below is the code that i am trying to execute .
===========================
Code:
cat << EOF
<html> 
<table>
<table border="1">
<tr>
<th><th class="greyCol"Format</th>
<th><th class="greyCol"1:00 AM</th>
<th><th class="greyCol"2:00 AM</th>
<th><th class="greyCol"5:00 AM</th>
</tr>
<tr>
<td><td class="blueCol"UK Express A50</td>
<td><td class="blueCol"$5460</td>
<td><td class="blueCol"$25460</td>
<td><td class="blueCol"N/A</td>
</tr>
<tr>
<td><td class="blueCol"Express C10</td>
<td><td class="blueCol"$2012</td>
<td><td class="blueCol"$1_2012</td>
<td><td class="blueCol"N/A</td>
</tr>
<tr>
<td><td class="blueCol"Patch</td>
<td><td class="blueCol"$2978</td>
<td><td class="blueCol"$12978</td>
<td><td class="blueCol"N/A</td>
</tr>
<tr>
<td><td class="blueCol"Non Patch</td>
<td><td class="blueCol"$3009</td>
<td><td class="blueCol"$43009</td>
<td><td class="blueCol"N/A</td>
</tr>
<tr>
<td><td class="blueCol"ROI Super</td>
<td><td class="blueCol"$13504</td>
<td><td class="blueCol"$3504</td>
<td><td class="blueCol"N/A</td>
</tr>
</table> 
</html> 
EOF


Last edited by radoulov; 01-08-2010 at 06:25 AM.. Reason: Please use code tags!
# 5  
Old 01-08-2010
Hi,
don't You mean to use echo and redirection (>)? The cat command expects a file name to conCATenate.

Best regards,
Lakris
# 6  
Old 01-08-2010
You are missing a dash '-' (No the dash doesnt matter, cat << EOF and cat <<-EOF are the same.).

its cat <<-EOF
...
<your stuff here>
...
EOF

Quote:
Originally Posted by isaacsam
Given below is the code that i am trying to execute .
And it will just echo the your stuff to the terminal.

Last edited by ni2; 01-08-2010 at 07:50 AM.. Reason: opps, my mistake.
# 7  
Old 01-08-2010
sorry, I was wrong about the cat... stdin is used when no file is specified.

But, is the HTML table definition really correct? There are open <td in the code?

/L
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Issue with selecting the text in gvim

Hi, I wanted to select the text in gvim using mouse for coping. some times it works fine and full text will be selected and copied to clipboard if it is like shown in first fig. Paste of the copied text can be done by clicking the middle mouse button. But some times the text will be selected as... (2 Replies)
Discussion started by: twistedpair
2 Replies

2. Shell Programming and Scripting

Encoding of a text issue

I created one file on windows system and is visible as : TestTable,INSERT,večilnin1ईगल受害者是第,2010-02-02 10:10:10.612447,137277,ईगल受害者是第večilnin!@#$%^&*()_+=-{}] But when send this file to unix system, the file is visible as : TestTable,INSERT,žvečilnin1ई-ल -害...是第,2010-02-02 ... (4 Replies)
Discussion started by: Shaishav Shah
4 Replies

3. Shell Programming and Scripting

Text Formating or Modifying

Hi Experts, I have a text exactly like below in a file: id item_id item_date prin_mkt_val --------------------------- --------------------------- ------------------------------- ------------------------ ... (1 Reply)
Discussion started by: apatil65
1 Replies

4. Shell Programming and Scripting

Text formating

Dear all I had input file as mention below and want op as mention. Kindly let me knw possible ways. Regards Jaydeep INPUT: RXOTX-48-1 2A 34 2B 35 RXOTX-499-2 2C 32 RXOTX-4-1 2D 23 OUTPUT: (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies

5. Shell Programming and Scripting

TEXT formating using script

Dear All I am facing problem while extracting data from below mention input file. My op should be like this.Required field display in red in file. Request you all to help. OP: RXOTX-46-5 1B4 RXOTX-46-4 2B5 INPUT FILE: <RXMFP:MO=RXOTX-46-5; RADIO X-CEIVER ADMINISTRATION... (4 Replies)
Discussion started by: jaydeep_sadaria
4 Replies

6. UNIX for Dummies Questions & Answers

Sed text replacement issue.

Hi, Im trying to find and replace text within a unix file using sed. The command that i have been using is sed '/,null,/ s//, ,/g' result.txt>result.tmp for replacing ",null," with ", ,". But this only replaces the first occurrance of ,null, in every line. I want to do it globally. It... (7 Replies)
Discussion started by: sohaibs
7 Replies

7. Forum Support Area for Unregistered Users & Account Problems

Formating mailx text file for Lotus Notes users

We use AIX mailx or sendmail. How can I format a text file so that lotus notes users can see diferent fonts and highlighting. Or can a gif file (company logo..) be sent along with a text file and the Lotus notes user would see the logo and text displayed at the same time and not as an attachment? (0 Replies)
Discussion started by: lidoiwo
0 Replies

8. UNIX for Dummies Questions & Answers

Formating text from a script into a log file

Using a for loop I am able to get the following log file below. I would like o change the format a bit as is indicated lower down. I have looked at awk and sed but somehow is not getting any joy. I am a bit new to ksh scripting. Please assist. This is the format of my current log file after the... (1 Reply)
Discussion started by: hugow
1 Replies

9. UNIX for Dummies Questions & Answers

text formating/Text space padding

Hi, How do I format the following? I have a for loop that retrieves me the path and file name of a file. In column fashion I would like to add the time and another variable containing the file's size. This will result in all the time being under each other and all the file size's being under... (6 Replies)
Discussion started by: hugow
6 Replies
Login or Register to Ask a Question