HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Passing arguements and printing it
Operating System - HP-UX
1837960
Members
2486
Online
110124
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
Forums
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
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
03-28-2004 01:51 AM
03-28-2004 01:51 AM
Passing arguements and printing it
conn=$1
echo $1 #This will display what i entered
how do i print it ?
if i say
ls -lt *.fmb |'{print $9,conn}
gives an error
echo $1 #This will display what i entered
how do i print it ?
if i say
ls -lt *.fmb |'{print $9,conn}
gives an error
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2004 02:37 AM
03-28-2004 02:37 AM
Re: Passing arguements and printing it
Hi,
I hope, you mean:
..
..
conn=$1
ls -lt *.fmb| awk '{print $9,cnn}' cnn=$conn
I hope, you mean:
..
..
conn=$1
ls -lt *.fmb| awk '{print $9,cnn}' cnn=$conn
Entities are not to be multiplied beyond necessity - RTFM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2004 07:15 AM
03-28-2004 07:15 AM
Re: Passing arguements and printing it
You question is very unclear; it looks like you are trying to mix in some awk syntax without invoking awk. If all you want to do is send output to a printer, that is most often done via the "lp" command which can take a file or stdin as input.
echo "${conn}" | lp -dmyprinter
Man lp for details.
echo "${conn}" | lp -dmyprinter
Man lp for details.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2004 12:41 AM
03-29-2004 12:41 AM
Re: Passing arguements and printing it
Thks for the reply.I have solved this.
just to clear what i wanted.
I would be passing a parameter(connect sting) to the shell script while running the shell script.The objective of shell script is just getting the output of ls -lt *.fmb i.e the listing of this file into the text as 1st paramter and second parameter as this connectstring.What i wanted was to write this parametr which i am passing along with the out of ls-lt to be writting to the same text file using print command .
Then the output of this shell script + the parameter would be rediredted to text file say tt.txt.
Then using the awk prog.awk tt.txt file i would be reading and again the output of this will be redirected to a file and this file will compile my form(fmb) using the 1st parameter fmb filename and second parameter(which the user enter i.e username&password to conn to the db at the begin).
thks for the support once again.
Vijaya
just to clear what i wanted.
I would be passing a parameter(connect sting) to the shell script while running the shell script.The objective of shell script is just getting the output of ls -lt *.fmb i.e the listing of this file into the text as 1st paramter and second parameter as this connectstring.What i wanted was to write this parametr which i am passing along with the out of ls-lt to be writting to the same text file using print command .
Then the output of this shell script + the parameter would be rediredted to text file say tt.txt.
Then using the awk prog.awk tt.txt file i would be reading and again the output of this will be redirected to a file and this file will compile my form(fmb) using the 1st parameter fmb filename and second parameter(which the user enter i.e username&password to conn to the db at the begin).
thks for the support once again.
Vijaya
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.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP