Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Vi search starting from line n --- any trick for this ??? Post 302827635 by ctsgnb on Sunday 30th of June 2013 04:44:43 AM
Old 06-30-2013
you can also Go to line 100 (makes line 100 your current line)

in command mode :
100G
(if you don't specify a line number, G will bring you at the end of the file)

Then launch your search from there depending whether you want to look forward or backward for your RE:
/RE
or
?RE
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to delete text from line starting pattern1 up to line before pattern2?

My data is xml'ish (here is an excerpt) :- <bag name="mybag1" version="1.0"/> <contents id="coins"/> <bag name="mybag2" version="1.1"/> <contents id="clothes"/> <contents id="shoes"/> <bag name="mybag3" version="1.6"/> I want to delete line containing mybag2 and its subsequent... (5 Replies)
Discussion started by: repudi8or
5 Replies

2. UNIX for Dummies Questions & Answers

modify a particular pattern starting from second line of the search pattern

Hi, I am new to this forum and i would like to get help in this issue. I have a file 1.txt as shown: apple banana orange apple grapes banana orange grapes orange .... Now i would like to search for pattern say apple or orange and then put a # at the beginning of the pattern... (2 Replies)
Discussion started by: imas
2 Replies

3. UNIX for Dummies Questions & Answers

modify a particular pattern starting from second line of the search pattern

Hi, I think you ppl did not get my question correctly, let me explain I have 1.txt with following entries as shown: 0152364|134444|10.20.30.40|015236433 0233654|122555|10.20.30.50|023365433 ** ** ** In file 2.txt I have the following entries as shown: ... (1 Reply)
Discussion started by: imas
1 Replies

4. Shell Programming and Scripting

need a cmd to search starting word

example - shsk mss-sdsd-asd i need a command which will search for staring word not others it should search only -shsk cat filename | grep '-' will search whole '-' in the file but i need to search only staring '-' thank u revenna (1 Reply)
Discussion started by: revenna
1 Replies

5. Shell Programming and Scripting

perl search and replace - search in first line and replance in 2nd line

Dear All, i want to search particular string and want to replance next line value. following is the test file. search string is tmp,??? ,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50 tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
3 Replies

6. Shell Programming and Scripting

How to print line starting with certain string together with its following line?

Dear all, How can I print line starting with certain string together with its following line. Example is as follows: Input file: @M01596:22:000000000-A7YH7:1:1101:16615:1070 2:N:0:1... (2 Replies)
Discussion started by: huiyee1
2 Replies

7. Shell Programming and Scripting

With script bash, read file line per line starting at the end

Hello, I'm works on Ubuntu server My goal : I would like to read file line per line, but i want to started at the end of file. Currently, I use instructions : while read line; do COMMAND done < /var/log/apache2/access.log But, the first line, i don't want this. The file is long... (5 Replies)
Discussion started by: Fuziion
5 Replies

8. UNIX for Dummies Questions & Answers

How to grep a line not starting with # from a file (there are two lines starting with # and normal)?

e.g. File name: File.txt cat File.txt Result: #INBOUND_QUEUE=FAQ1 INBOUND_QUEUE=FAQ2 I want to get the value for one which is not commented out. Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies

9. UNIX for Beginners Questions & Answers

Search for words starting and ending with

im trying to search for a WORD in a file which begins with a number followed by a hypen follwed multiple words and end with a dot "." and pront the entire line which matches the above. Please note that there is a space at the begining of each line i/p file 19458 00000-CONTROL-PARA.... (5 Replies)
Discussion started by: anijan
5 Replies

10. Shell Programming and Scripting

Remove new line starting with a numeric value and append it to the previous line

Hi, i have a file with multiple entries. After some tests with sed i managed to get the file output as follows: lsn=X-LINK-IN0,apc=661:0,state=avail,avail/links=1/1, 00,2110597,2094790,0,81,529,75649011,56435363, lsn=TM1ITP1-AM1ITP1-LS,apc=500:0,state=avail,avail/links=1/1,... (5 Replies)
Discussion started by: nms
5 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 04:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy