- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Add PCL Commands to a file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО11-11-2009 08:11 PM
тАО11-11-2009 08:11 PM
Here is what I have in my script, I am trying to add PCL to the front of a file and then add PCL to the end of the file.
sed '1i\/
sed '$a\\
Can anyone assist by letting be know what I am doing wrong.
Thanks
Andy
Solved! Go to Solution.
- Tags:
- echo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2009 08:57 PM
тАО11-11-2009 08:57 PM
Re: Add PCL Commands to a file
Well, perhaps LF.
> the file which prints the first page one
> line down. [...]
What's in your files? ("man od".)
The following is with Bash on a Solaris
system, and the "echo" details may be
different elsewhere, but ...
ra# echo -n 'abc>' > file_start.txt
ra# echo -n '
ra# cat file_text.txt
Line 1.
Line 2.
Line 3.
ra# cat file_start.txt file_text.txt file_end.txt
abc>Line 1.
Line 2.
Line 3.
No new newline characters there. It not be
natural (or middle-class), but it is possible
(even with a shell script) to create a file
containing text without a newline character.
"man sed" (and/or its friends) might reveal
some exotic octal coding scheme ("\033"?)
which would let you put an ESC into a
command, but I'd probably stick with the
loose files. Of course, as usual, many
things are possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2009 09:01 PM
тАО11-11-2009 09:01 PM
Re: Add PCL Commands to a file
Make that: [...] It might not be [...]
(Why do I always see these right _after_
hitting "Submit"?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2009 09:15 PM
тАО11-11-2009 09:15 PM
Re: Add PCL Commands to a file
This is basically what I am doing know. Here is the script and output on HP/UX
echo "
echo "
cat print.init print.file print.exit
Output:
LINE 1
LINE 2
LINE 3
LINE 4
LINE 5
As you can see the PCL and LINE 1 are on different lines.
Thanks
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2009 09:23 PM
тАО11-11-2009 09:23 PM
Solution> [...]
Yes, and if "basically" were close enough,
then you'd be home already.
> As you can see the PCL and LINE 1 are on
> different lines.
Yes, and, as I hope that _you_ can see, in my
demonstration, "abc>" and "Line 1." came out
on the same line. It's the miracle of "-n"
(or equivalent).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2009 09:39 PM
тАО11-11-2009 09:39 PM
Re: Add PCL Commands to a file
The equivalent is \c on the HP/UX box.
Problem solved.
Thanks
Andy