The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to insert child job under a box job? xejatt UNIX for Dummies Questions & Answers 4 03-12-2008 04:08 PM
sed: how to insert tab? Juha Shell Programming and Scripting 2 10-29-2007 07:15 AM
How to insert tab at specified column.HELP sslr UNIX for Dummies Questions & Answers 7 09-21-2007 11:54 AM
Insert a line aajan UNIX for Advanced & Expert Users 5 08-20-2007 02:49 AM
Cut Paste and Insert Help PradeepRed Shell Programming and Scripting 5 12-09-2005 05:49 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-26-2008
rchuttke rchuttke is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 2
How do I insert x'0D' ?

I'm directing output to a *.dat file. The first byte is a variable, the second must be a carriage-return (x'0D'). Is there a UNIX equivalent of an ASCII command that will allow me to output this byte?
  #2 (permalink)  
Old 03-26-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
Nothing really easy is thoroughly standardized. Most systems these days would come with a printf(1) command. If you want to be 1970s compliant then maybe something like

Code:
echo | tr '\012' '\015'
(In case this is not obvious, a lone echo prints just a newline, and the tr converts it to something else; the codes understood by tr are, regrettably, in octal.)
  #3 (permalink)  
Old 03-26-2008
rchuttke rchuttke is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 2
That did it! Thanks!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0