Sponsored Content
Operating Systems Linux Output formatting problem..Plz hlp Post 302208217 by joeyg on Monday 23rd of June 2008 09:39:53 AM
Old 06-23-2008
Hammer & Screwdriver Do you have to do all that Excel and Word stuff?

Before approaching from unix, Excel will read csv (comma separated values) files without having to do much of anything. I write to csv [use a , instead of | as delimiter] whenever I need to create something for my users that they will want to open in Excel.

What I am thinking is:
(a) create your "|" delimited file [coding already in-place]
(b) follow-up script to read that file and create a .txt output file

The follow-up would be roughly:

Code:
rm printfile.txt
while read zf
   do
   fld1=$(echo "$zf" | cut -d"|" -f1)
   fld2=$(echo "$zf" | cut -d"|" -f2)
   fld3=$(echo "$zf" | cut -d"|" -f3"
   echo "Name: "$fld1 >>printfile.txt
   echo " " >>printfile.txt
   echo ...
     {rest of echo lines per record}
done

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to download Red hat plz Hlp ?

ftp://metalab.unc.edu/pub/Linux/distributions/ Hi all , I know how to go to the distibution site but How to download if using ftp I want to ask this Q:confused: (3 Replies)
Discussion started by: atiato
3 Replies

2. UNIX for Dummies Questions & Answers

How to connect to the Internet Using RH 7.2 i.e configuration plz Hlp

How to connect to the Internet Using RH 7.2 i.e configuration plz Hlp.....cause I want to accsses to the Internet to download Help and application in the Red hat OS???? (1 Reply)
Discussion started by: atiato
1 Replies

3. UNIX for Dummies Questions & Answers

plz Help How should I configure cc compiler output file plz help???

i.e configuration of C compiler :confused: (4 Replies)
Discussion started by: atiato
4 Replies

4. UNIX for Dummies Questions & Answers

What is the output of that Shell Scripts Plz tell me

tr "" "" | sort | awk 'length($0)>0' | uniq -c (1 Reply)
Discussion started by: brain_full
1 Replies

5. Shell Programming and Scripting

Output formatting prob.. guyz plz hlp

:)Hi guys, I have written a script that returns 3 things of all the employees in my organisation. i.e. Name, Login time & log out time of each and every employee. It returns the output in pipe-delimited format. For your ref. sending a small sample e.g. Deepti|083032|174501... (5 Replies)
Discussion started by: anushree.a
5 Replies

6. Shell Programming and Scripting

output formatting problem

I would like to keep the complete lines in the output, but my script adds carriage returns for each space (e.g. keep BRITISH AIRWAYS on one line in the output): File1= BAW BRITISH AIRWAYS RYR RYAN AIR for i in $(cat File1) do echo $i done Output: BAW BRITISH AIRWAYS RYR... (4 Replies)
Discussion started by: barny
4 Replies

7. Shell Programming and Scripting

Need some Help for file filteration and saving the output in other directory using grep....plz ...

Hi all........ Plss do help me.......in a big trouble... :wall::wall::wall: I have 3 directories named as :1. /home/shuchi/source 2./home/shuchi/destination 3./home/shuchi/filter now the problem is /home/shuchi/source has say 2 files with extension .txt as given below : A.txt Code: ... (0 Replies)
Discussion started by: ektubbe
0 Replies

8. Shell Programming and Scripting

Problem in formatting output of SQL query in excel sheet in shell script

Hi Guys.. Need your help to format the output of my shell script. I am using spool command to take out put in csv file. below is my code. (for example) col USERNAME for a15 col EMAIL for a30 col FULL_NAME for a20 col LAST_LOGIN for a40 col DATE_CREATED for a40 SPOOL 120.csv... (3 Replies)
Discussion started by: Agupte
3 Replies

9. Shell Programming and Scripting

Output formatting problem

Hello; I have a simple loop filtering a log: for LU in $(< LU-list-Final) do OUT=$(grep -B1 $LU cibc-src-ip.cap |egrep 'IP 16|IP 19|IP 15' |awk -F">" '{print $1}') if ; then echo " LU $LU was accessed by ===============> $OUT " echo "" fi done The current output snippet looks like... (2 Replies)
Discussion started by: delphys
2 Replies

10. Shell Programming and Scripting

Problem in formatting output in sed / awk

I have a file like this : ! 1 ! 542255 ! 50,140.00 ! ! 2 ! 551717 ! 5,805.00 ! ! 3 ! 551763 ! 8,130.00 ! ! 4 ! 551779 ! 750.00 ! ! 5 ! 551810 ! 56,580.00 ! ! 6 ! 551816 ! 1,350.00 ! ! 7 ! 551876 ! 360.00 ! ! 8 ! 551898 ! ... (10 Replies)
Discussion started by: adam1969in
10 Replies
halibut(1)							   Simon Tatham 							halibut(1)

NAME
halibut - multi-format documentation formatting tool SYNOPSIS
halibut [options] file1.but [file2.but ...] DESCRIPTION
halibut reads the given set of input files, assembles them into a document, and outputs that document in one or more formats. The available command-line options can configure what formats Halibut should output in, and can also configure other things about the way Halibut works. OPTIONS
The command-line options supported by halibut are: --text[=filename] Makes Halibut generate an output file in plain text format. If the optional filename parameter is supplied, the output text file will be given that name. Otherwise, the name of the output text file will be as specified in the input files, or output.txt if none is specified at all. --html[=filename] Makes Halibut generate one or more output files in HTML format. If the optional filename parameter is supplied, there will be pre- cisely one HTML output file with that name, containing the whole document. Otherwise, there may be one or more than one HTML file produced as output; this, and the file names, will be as specified in the input files, or given a set of default names starting with Contents.html if none is specified at all. --winhelp[=filename] Makes Halibut generate an output file in Windows Help format. If the optional filename parameter is supplied, the output help file will be given that name. Otherwise, the name of the output help file will be as specified in the input files, or output.hlp if none is specified at all. The output help file must have a name ending in .hlp; if it does not, .hlp will be added. A secondary contents file will be created alongside the main help file, with the same name except that it will end in .cnt (for example output.cnt, if the main file is out- put.hlp). --man[=filename] Makes Halibut generate an output file in Unix man page format. If the optional filename parameter is supplied, the output man page will be given that name. Otherwise, the name of the output man page will be as specified in the input files, or output.1 if none is specified at all. --info[=filename] Makes Halibut generate an info file. If the optional filename parameter is supplied, the output info file will be given that name. Otherwise, the name of the output info file will be as specified in the input files, or output.info if none is specified at all. By default, unless configured otherwise using the cfg{info-max-file-size}{0} directive, the info output will be split into multiple files. The main file will have the name you specify; the subsidiary files will have suffixes -1, -2 etc. --pdf[=filename] Makes Halibut generate an output file in PDF format. If the optional filename parameter is supplied, the PDF output file will be given that name. Otherwise, the name of the output PDF file will be as specified in the input files, or output.pdf if none is speci- fied at all. --ps[=filename] Makes Halibut generate an output file in PostScript format. If the optional filename parameter is supplied, the PostScript output file will be given that name. Otherwise, the name of the output PostScript file will be as specified in the input files, or out- put.ps if none is specified at all. -Cword:word[:word...] Adds a configuration directive to the input processed by Halibut. Using this directive is exactly equivalent to appending an extra input file to the command line which contains the directive cfg{word}{word}{word...}. --input-charset=charset Changes the assumed character set for input files from the default of ASCII. --list-charsets Makes Halibut list character sets known to it. --list-fonts Makes Halibut list fonts known to it, either intrinsically or by being passed as input files. --precise Makes Halibut report the column number as well as the line number when it encounters an error in an input file. --help Makes Halibut display a brief summary of its command-line options. --version Makes Halibut report its version number. --licence Makes Halibut display its licence (MIT). MORE INFORMATION
For more information on Halibut, including full details of the input file format, look in the full manual. If this is not installed locally on your system, you can also find it at the Halibut web site: http://www.chiark.greenend.org.uk/~sgtatham/halibut/ BUGS
This man page isn't terribly complete. Halibut 2004-04-08 halibut(1)
All times are GMT -4. The time now is 09:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy