Sponsored Content
Top Forums Shell Programming and Scripting Regex to pick up name from the following including carriage return at end of the line Post 24792 by peter.herlihy on Wednesday 17th of July 2002 06:22:54 PM
Old 07-17-2002
From the look of your data - you'd need a number of commands....becasue the <<NAME>> could be line broken at any point across the field....is this so?

<
<NAME>>

or

<<
NAME>>

or

<<N
AME>>

etc.....
 

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. UNIX for Dummies Questions & Answers

Remove a carriage return at end of variable

Is there a command in unix to remove a carriage return character(^M) at the end of a variable value? (5 Replies)
Discussion started by: flagship99
5 Replies

3. Shell Programming and Scripting

Carriage Return at end of file

Hi, I have a script that outputs a file that contains the dates from the previous month, which is then used by our application to run processes on each date contained in the file. My problem is is that my script created a blank line at the bottom of the file which causes issues for our... (14 Replies)
Discussion started by: bd_joy
14 Replies

4. 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

5. Shell Programming and Scripting

add carriage return at end of file

Hi I would like to add carriage return at end of file, because we need to mask the customer names for detailed records. Some what the file doesnot have carriage at end of line of last record.So that i 'll get 2 records when use ---aa.txt----- 1|aaa|bbb|ccc 2|bbbb|hghgh|ggg 000002 tail... (2 Replies)
Discussion started by: HAA
2 Replies

6. UNIX for Advanced & Expert Users

Padding Carriage return to the end of XML file

Hi All, I am getting a xml file where the first field contains a carriage return and the all other fields doesnot contains any carriage return. So all the other records comes in the second line. <?xml version="1.0" encoding="UTF-8"?> <ns0:iSeriesCspIntegration... (3 Replies)
Discussion started by: dasj22
3 Replies

7. 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

8. 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

9. 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

10. 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
form_driver(3CURSES)					     Curses Library Functions					      form_driver(3CURSES)

NAME
form_driver - command processor for the forms subsystem SYNOPSIS
cc [ flag... ] file... -lform -lcurses [ library... ] #include <form.h> int form_driver(FORM *form, int c); DESCRIPTION
The form_driver() function is the workhorse of the forms subsystem; it checks to determine whether the character c is a forms request or data. If it is a request, the form driver executes the request and reports the result. If it is data (a printable ASCII character), it enters the data into the current position in the current field. If it is not recognized, the form driver assumes it is an application- defined command and returns E_UNKNOWN_COMMAND. Application defined commands should be defined relative to MAX_COMMAND, the maximum value of a request listed below. Form driver requests: REQ_NEXT_PAGE Move to the next page. REQ_PREV_PAGE Move to the previous page. REQ_FIRST_PAGE Move to the first page. REQ_LAST_PAGE Move to the last page. REQ_NEXT_FIELD Move to the next field. REQ_PREV_FIELD Move to the previous field. REQ_FIRST_FIELD Move to the first field. REQ_LAST_FIELD Move to the last field. REQ_SNEXT_FIELD Move to the sorted next field. REQ_SPREV_FIELD Move to the sorted prev field. REQ_SFIRST_FIELD Move to the sorted first field. REQ_SLAST_FIELD Move to the sorted last field. REQ_LEFT_FIELD Move left to field. REQ_RIGHT_FIELD Move right to field. REQ_UP_FIELD Move up to field. REQ_DOWN_FIELD Move down to field. REQ_NEXT_CHAR Move to the next character in the field. REQ_PREV_CHAR Move to the previous character in the field. REQ_NEXT_LINE Move to the next line in the field. REQ_PREV_LINE Move to the previous line in the field. REQ_NEXT_WORD Move to the next word in the field. REQ_PREV_WORD Move to the previous word in the field. REQ_BEG_FIELD Move to the first char in the field. REQ_END_FIELD Move after the last char in the field. REQ_BEG_LINE Move to the beginning of the line. REQ_END_LINE Move after the last char in the line. REQ_LEFT_CHAR Move left in the field. REQ_RIGHT_CHAR Move right in the field. REQ_UP_CHAR Move up in the field. REQ_DOWN_CHAR Move down in the field. REQ_NEW_LINE Insert/overlay a new line. REQ_INS_CHAR Insert the blank character at the cursor. REQ_INS_LINE Insert a blank line at the cursor. REQ_DEL_CHAR Delete the character at the cursor. REQ_DEL_PREV Delete the character before the cursor. REQ_DEL_LINE Delete the line at the cursor. REQ_DEL_WORD Delete the word at the cursor. REQ_CLR_EOL Clear to the end of the line. REQ_CLR_EOF Clear to the end of the field. REQ_CLR_FIELD Clear the entire field. REQ_OVL_MODE Enter overlay mode. REQ_INS_MODE Enter insert mode. REQ_SCR_FLINE Scroll the field forward a line. REQ_SCR_BLINE Scroll the field backward a line. REQ_SCR_FPAGE Scroll the field forward a page. REQ_SCR_BPAGE Scroll the field backward a page. REQ_SCR_FHPAGE Scroll the field forward half a page. REQ_SCR_BHPAGE Scroll the field backward half a page. REQ_SCR_FCHAR Horizontal scroll forward a character. REQ_SCR_BCHAR Horizontal scroll backward a character REQ_SCR_HFLINE Horizontal scroll forward a line. REQ_SCR_HBLINE Horizontal scroll backward a line. REQ_SCR_HFHALF Horizontal scroll forward half a line. REQ_SCR_HBHALF Horizontal scroll backward half a line. REQ_VALIDATION Validate field. REQ_PREV_CHOICE Display the previous field choice. REQ_NEXT_CHOICE Display the next field choice. RETURN VALUES
The form_driver() function returns one of the following: E_OK The function returned successfully. E_SYSTEM_ERROR System error. E_BAD_ARGUMENT An argument is incorrect. E_NOT_POSTED The form is not posted. E_INVALID_FIELD The field contents are invalid. E_BAD_STATE The routine was called from an initialization or termination function. E_REQUEST_DENIED The form driver request failed. E_UNKNOWN_COMMAND An unknown request was passed to the form driver. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
curses(3CURSES), forms(3CURSES), attributes(5) NOTES
The header <form.h> automatically includes the headers <eti.h> and <curses.h>. SunOS 5.11 31 Dec 1996 form_driver(3CURSES)
All times are GMT -4. The time now is 12:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy