- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: prinintg a file with date variable
Operating System - HP-UX
1745857
Members
4380
Online
108723
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2010 06:34 AM
06-30-2010 06:34 AM
Dear Gurus,
a small script , which look likes this :
case ~~
cd $BSSREPT;for i in `cat /home/mango/Reports/finance`;do;lp -d"$PRINTER_NAME" $i;done;;
the problem is :
$ more finance
132_DFO1001_Date_DEP.001.rpt
132_DFO1002_Date_DET.001.rpt
132_DFO1004_Date_DET_C.001.rpt
132_DFO1004_Date_SUM_C.001.rpt
132_DFO1004_DET_Date_C.001.rpt
~
since the file to be printed containd a date component which will vary everyday .....how can i have them print in my script ..hope i am clear ....Regards,
Rahul
a small script , which look likes this :
case ~~
cd $BSSREPT;for i in `cat /home/mango/Reports/finance`;do;lp -d"$PRINTER_NAME" $i;done;;
the problem is :
$ more finance
132_DFO1001_Date_DEP.001.rpt
132_DFO1002_Date_DET.001.rpt
132_DFO1004_Date_DET_C.001.rpt
132_DFO1004_Date_SUM_C.001.rpt
132_DFO1004_DET_Date_C.001.rpt
~
since the file to be printed containd a date component which will vary everyday .....how can i have them print in my script ..hope i am clear ....Regards,
Rahul
FrogIsDeaf
Solved! Go to Solution.
- Tags:
- date
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2010 07:02 AM
06-30-2010 07:02 AM
Solution
Hi:
> since the file to be printed containd a date component which will vary everyday
I assume that you mean your file is really a template of names where "_Date_" should be substituted with the current values. If so, you could do something like:
...
for i in `sed -e "s/_Date_/_$(date +%Y%m%d)_/" finance`; do
...
(or better):
...
for i in $(sed -e "s/_Date_/_$(date +%Y%m%d)_/" finance); do
...
Regards!
...JRF...
> since the file to be printed containd a date component which will vary everyday
I assume that you mean your file is really a template of names where "_Date_" should be substituted with the current values. If so, you could do something like:
...
for i in `sed -e "s/_Date_/_$(date +%Y%m%d)_/" finance`; do
...
(or better):
...
for i in $(sed -e "s/_Date_/_$(date +%Y%m%d)_/" finance); do
...
Regards!
...JRF...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP