Sponsored Content
Top Forums Shell Programming and Scripting Insert carriage return on the 10th char position of each line Post 302715631 by brichigo on Monday 15th of October 2012 07:11:58 AM
Old 10-15-2012
Thanks Scrutinizer!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

carriage return/line feeds

Hello, I have a file that has got carriage returns in it and I want to take them out. Anyone know how I can do this in a ksh? thanks (4 Replies)
Discussion started by: pitstop
4 Replies

2. Shell Programming and Scripting

How to insert carriage return before line feed?

I am doing some edi where translations had to be run on unix. Generally when I run the translations on windows, the output file has both carriage returns and line feed where as when ran on unix will have only line feed. I need to insert carriage return before the line feed. Is there some tool... (2 Replies)
Discussion started by: huey ing
2 Replies

3. UNIX for Dummies Questions & Answers

To remove carriage return between the line

Hi, I have a situation where I need to remove the carriage return between the lines. For.eg. The input file: 1,ad,"adc sdfd",edf 2,asd,"def fde",asd The output file should be 1,ad,adc sdfd,edf 2,asd,def fde,asd Thanks Shash (5 Replies)
Discussion started by: shash
5 Replies

4. Shell Programming and Scripting

Insert a line including Variable & Carriage Return / sed command as Variable

I want to instert Category:XXXXX into the 2. line something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong: sed "2i\\${n}Category:$cat\n" Sample: Titel Blahh Blahh abllk sdhsd sjdhf Blahh Blah Blahh Blahh Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies

5. Programming

Carriage return or line feed issues

I keep running into the same problem with the following script. Every time it prints the carrage (line feed) char when I test. I believe that the issue is in the group by but I do not see it. The code is as follows. SET FEED OFF SET ECHO OFF SET HEADING OFF SET LINESIZE 1000 SET PAGESIZE... (1 Reply)
Discussion started by: sherrod6970
1 Replies

6. Shell Programming and Scripting

Need a carriage return at end of each line

Hi All, I am reading two files and writing out the file name and count of lines in each file to an output file. My script looks like this: echo "input_file1.out;`wc -l < input_file1.out | sed 's/^]*\(.*\)]*$/\1/'` " > comp_file1.out echo "input_file2.out;`wc -l < input_file2.out | sed... (2 Replies)
Discussion started by: Hangman2
2 Replies

7. Shell Programming and Scripting

A variable is including the Carriage Return char...

Hi all, I'm reading a file with this layout: First_Col Second_Col The Second_Col has values as 1000, -1, 10, 43... While reading the file I'm getting the second column value with awk command, but it is including the CR control char. do item_saved=`echo $b | awk '{print... (4 Replies)
Discussion started by: mrreds
4 Replies

8. Shell Programming and Scripting

Bash - multiple line carriage return

Hello! I have one strange question - let's say I have a long, multiple-line string displayed on the terminal using echo, and I would like to make a carriage return to the beginning of this string, no to the beginning of the last line - is something like that possible? I would like to be able to... (1 Reply)
Discussion started by: xqwzts
1 Replies

9. Shell Programming and Scripting

line carriage return characters

Hi, I would like to insert the line carriage retrun characters on each line. (2 Replies)
Discussion started by: koti_rama
2 Replies

10. Shell Programming and Scripting

Remove carriage return and append the next line

Hi All, My requirement is to remove the carriage return in from the lines which i am reading if the length is lesser than 1330 and append the next line with it. Below is the realistic example of file structure. Input file: Blah blah blah blah Blah blah blah blah Blah blah blah blah Blah... (16 Replies)
Discussion started by: mad man
16 Replies
curs_insstr(3)						     Library Functions Manual						    curs_insstr(3)

NAME
curs_insstr, insstr, insnstr, winsstr, winsnstr, mvinsstr, mvinsnstr, mvwinsstr, mvwinsnstr - Insert a string before the character under the cursor in a Curses window SYNOPSIS
#include <curses.h> int insstr( const char *str ); int insnstr( const char *str, int n ); int winsstr( WINDOW *win, const char *str ); int winsnstr( WINDOW *win, const char *str, int n ); int mvinsstr( int y, int x, const char *str ); int mvinsnstr( int y, int x, const char *str, int n ); int mvwinsstr( WINDOW *win, int y, int x, const char *str ); int mvwinsnstr( WINDOW *win, int y, int x, const char *str, int n ); LIBRARY
Curses Library (libcurses) STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: insstr, insnstr, winsstr, winsnstr, mvinsstr, mvinsnstr, mvwinsstr, mvwinsnstr: XCURSES4.2 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
These routines insert a character string (as many characters as will fit on the line) before the character under the cursor. All characters to the right of the cursor are moved to the right, with the possibility of the rightmost characters on the line being lost. The cursor position does not change (after moving to y, x, if specified). This does not imply use of the hardware insert-character feature. The four routines with n as the last argument insert at most n characters. If n<=0, then the routines insert the entire string. If a character in str is a tab, newline, carriage return, or backspace, the routines move the cursor appropriately within the window. A newline also causes clrtoeol before moving. Tabs are considered to be at every eighth column. If a character in str is another control character, it is drawn in the ^X notation. Calling winch after adding a control character (and moving to it, if necessary) does not return the control character, but instead returns the representation of the control character. NOTES
The header file <curses.h> automatically includes the header file <stdio.h>. Note that all but winsnstr may be macros. RETURN VALUES
All routines return the integer ERR upon failure and OK upon successful completion. SEE ALSO
Functions: curses(3), curs_clear(3), curs_inch(3) Others: standards(5) curs_insstr(3)
All times are GMT -4. The time now is 07:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy