473,395 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

constructing a file to print

I have a text file, data.txt, which looks like :-

head1 head2 head3
data1 1 data 1 2 data 1 3
data 2 1 data 2 2 data 2 3
data 3 1 data 3 2 data 3 3
etc etc

I would like to print this file, using the lp –d command,
with a heading line, as follows :-

Report for whatever department as at {today’s date}
Then a space line
Then all of data.txt.

I can store in a text file the first part of the heading line, up to the date.
I can then use

Expand|Select|Wrap|Line Numbers
  1. date > temp1
  2. cut –d “ “ –f 1-4 < temp1 > temp2
  3.  
to get today’s date.

But how do I then construct the required file for printing ?

Many thanks
Feb 17 '11 #1
0 1271

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Ruben | last post by:
Hello. I am trying to read a small text file using the readline statement. I can only read the first 2 records from the file. It stops at the blank lines or at lines with only spaces. I have a...
3
by: JOSHUA JACKS | last post by:
I accidentally removed the "Print" option from the default "File" menu (don't ask). When I replaced it, the replacement prints automatically without calling up the print dialog. I can still get...
3
by: Bryan Shaw | last post by:
I do not want my users to be able to copy and paiste anything on these web pages, which will be on an internal web site. Is there a way to prevent the printing of a web page? Is there a way to...
11
by: utabintarbo | last post by:
Here is my situation: I am trying to programatically access files created on an IBM AIX system, stored on a Sun OS 5.8 fileserver, through a samba-mapped drive on a Win32 system. Not confused?...
1
by: DavidA | last post by:
I have a very simple form and perl script that is to upload a jpg file. I am not familiar with the perl language but copied the code from a text book. It works fine with all browsers except IE....
3
by: undshan | last post by:
I am writing a code that needs to open a file, create an output file, run through my function, prints the results to the output file, and closes them within a loop. Here is my code: #include...
0
by: linuxos | last post by:
I'm newbie in C# . I need some help: 1. i want to save the contents (lines, circles, other) of a panel to a bmp/jpg file in C#. 2. i want to print the contents of that panel i'm drawing on that...
2
by: gbrendemuehl | last post by:
I have an application (Access 2003) that 'prints' reports to PDF files. I would like to add the ability to print those PDF files on a printer. I have found and tested 'open file dialog' code, but...
2
by: hutch75 | last post by:
Hi folks, I've been dead-ending on this issue, and I'm dusting off my brain to re-engage with Perl, so pls bear with me. Here's an example of what I'm trying to accomplish, have tried several...
4
by: nitupatra | last post by:
I have perl script which will make a zip file and create a HTML form with asubmit button to send the zip file client. When user click the download button the zip file will be downloaded. But the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.