Sponsored Content
Full Discussion: How do I insert x'0D' ?
Top Forums UNIX for Dummies Questions & Answers How do I insert x'0D' ? Post 302178802 by era on Wednesday 26th of March 2008 10:35:45 AM
Old 03-26-2008
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.)
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to insert new coloum

Dear friends, I have a dataset like this 2.18 66.86 27.9 2.18 66.86 27.9 2.18 66.86 27.9 2.15 66.88 27.9 2.15 66.88 27.9 Now i have another dataset containing date coloum like this 22-12-2005 22-12-2005 22-12-2005 22-12-2005 22-12-2005 Now i want to... (3 Replies)
Discussion started by: rajan_ka1
3 Replies

2. Solaris

Not able to insert data

Hi All, I enhanced a perl script that creates a table with xyz_yyyymm and insert data from xyz table before truncate xyz.I have tested it successfully in dev but when i ran it on production new table xyz_yyyymm created but did not insert any records from xyz.(No errors were thrown)The perl... (1 Reply)
Discussion started by: megh
1 Replies

3. Shell Programming and Scripting

Insert Header Name

Can anyone help. I have sql to CSV showing header with ALIAS names but I want to generate CSV file with user friendly name i.e from AIAN8 to Adress Book Number etc. SELECT AIAN8 || , || F0101.ABALPH || , || AICO || showing following below in CSV output intead of above Address... (4 Replies)
Discussion started by: s1a2m3
4 Replies

4. Shell Programming and Scripting

How to insert a char in every two?

Hi, I've written a script to interrogate all fibre devices on our systems and output the WWNs to a file. I now want to insert a ":" every 2 characters into the WWN so I can write another script to create aliases within the SAN. So the current file has WWNs in the following format;... (2 Replies)
Discussion started by: h8mmer
2 Replies

5. Shell Programming and Scripting

Insert between lines.

Hello...I'm here again. This is the situation I want check if exist text between two lines: Example: interface description --text to verify ip adress if not exists text between 'interface' and 'ip address' i want insert the word 'no description' interface no description --if not... (4 Replies)
Discussion started by: bobbasystem
4 Replies

6. Shell Programming and Scripting

Search and Insert

Hi All I got one problem and want your help,what i want to do is Input 123 key0=A;B;C;:key1=X;Y;Z;: here 123 is a username I should search the username (in this case it is 123) in file and if found it should insert the additional string D as below Here 123 and key are tab seperated ... (6 Replies)
Discussion started by: parthmittal2007
6 Replies

7. UNIX for Dummies Questions & Answers

insert comma

my file looks like this: 297 PC Closed 07/10/12 999000098 AMERICAN SOCIETY FOR HEALTHCAR 0.00 USD 1 NAI i want to look line this: 297,PC,Closed,07/10/12,999000098,AMERICAN SOCIETY FOR HEALTHCAR,0.00,USD,1,NAI (4 Replies)
Discussion started by: lawsongeek
4 Replies

8. Linux

How to insert EOL?

How can I insert End of line (EOL) in Unix to file. Thanks (5 Replies)
Discussion started by: mrn6430
5 Replies

9. UNIX for Dummies Questions & Answers

Insert line

Hello Is there any sed command to insert a line after nth line... have a file of 500000 lines Thanks (4 Replies)
Discussion started by: Madiouma Ndiaye
4 Replies
vis(1)							      General Commands Manual							    vis(1)

NAME
vis, inv - make unprintable and non-ASCII characters in a file visible or invisible SYNOPSIS
file ... file ... DESCRIPTION
reads characters from each file in sequence and writes them to the standard output, converting those that are not printable or not ASCII into a visible form. inv performs the inverse function, reading printable characters from each file, returning them to non-printable or non-ASCII form, if appropriate, then writing them to standard output; Non-printable ASCII characters are represented using C-like escape conventions: backslash backspace escape form-feed new-line carriage return space horizontal tab vertical tab the character whose ASCII code is the 3-digit octal number n. the character whose ASCII code is the 2-digit hexadecimal number n. Non-ASCII single- or multi-byte characters are examined one byte at a time. For each byte, if it can be displayed as an ASCII character, it is treated as if it is an ASCII character; Otherwise, it is represented in the following conventions: the 8-bit character whose code value is the 3-digit octal number n. the 8-bit character whose code value is the 2-digit hexadecimal number n. Space, horizontal-tab, and new-line characters can be treated as printable (and therefore passed unaltered to the output) or non-printable depending on the options selected. Backslash, although printable, is expanded by vis, to a pair of backslashes so that when they are passed back through inv, they convert back to a single backslash. If no input file is given, or if the argument is encountered, and inv read from the standard input. Options and recognize the following options: Treat new-line, space, and horizontal tab as non-printable characters. expands them visibly as and rather than passing them directly to the output. discards these characters, expecting only the printable expansions. New-line characters are inserted by every 16 bytes so that the output will be in a form that is usable by most editors. Make and silent about non-existent files, identical input and output, and write errors. Normally, no input file can be the same as the output file unless it is a special file. Treat horizontal-tab and space characters as non-printable in the same manner that treats them. Cause output to be unbuffered (byte-by-byte); normally, output is buffered. Cause output to be in hexadecimal form rather than the default octal form. Either form is accepted to as input. EXTERNAL INFLUENCES
Environment Variables determines the language in which messages are displayed. International Code Set Support Single- and multi-byte character code sets are supported. WARNINGS
Redirecting output to an input file destroys the original data. Therefore, command forms such as should be avoided unless the source file can be safely discarded. AUTHOR
was developed by HP. SEE ALSO
cat(1), echo(1), od(1). vis(1)
All times are GMT -4. The time now is 08:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy