HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- HPE 9000 and HPE e3000 Servers
- >
- Need to echo output to file greater than 96 charac...
HPE 9000 and HPE e3000 Servers
1833762
Members
2466
Online
110063
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
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
02-18-2002 01:46 PM
02-18-2002 01:46 PM
I have a script that uses echo to write output to a file. The text of the message is greater than 96 characters. A cr/lf is being inserted breaking up the line. Text includes directory path. Any ideas? I tried printf and it does the same thing...
jack...
jack...
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2002 02:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2002 03:34 PM
02-18-2002 03:34 PM
Re: Need to echo output to file greater than 96 characters...
Hi:
Echo should not do this and should ceratinly not insert a CR/LF pair unless being told to do that via \r\n. I suspect that your input data already has the CR/LF pair and what you are seeing is an artifact.
I suggest that you filter your data through dd to remove any CR's and LF's.
e.g.
#!/usr/bin/sh
# assume your input data is in ${XX}
YY=$(echo ${XX} | tr -d "\015\010")
echo ${YY}
I suspect that now the only LF you will see is the one at the end; that can be eliminated with
echo "${YY}\c".
Regards, Clay
Echo should not do this and should ceratinly not insert a CR/LF pair unless being told to do that via \r\n. I suspect that your input data already has the CR/LF pair and what you are seeing is an artifact.
I suggest that you filter your data through dd to remove any CR's and LF's.
e.g.
#!/usr/bin/sh
# assume your input data is in ${XX}
YY=$(echo ${XX} | tr -d "\015\010")
echo ${YY}
I suspect that now the only LF you will see is the one at the end; that can be eliminated with
echo "${YY}\c".
Regards, Clay
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2002 05:13 AM
02-19-2002 05:13 AM
Re: Need to echo output to file greater than 96 characters...
I did some further tracing and realized what I did. The script captured the cr/lf from a previous capture of ll output.
Works fine now. Thanks for the feedback..
jack...
Works fine now. Thanks for the feedback..
jack...
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