10-04-2016
You lost me. WHAT are you doing "After grep"? Describe and post output.
And, please post your "while loop" so we can improve it or infer from it what needs to be done.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a log file (say log.txt). I have to search for a line which has the string ( say ERROR) in the log file and copy 15 lines after this into another file (say error.txt). Can someone give me the code and this has to be in PERL
Thanks in advance
Ammu (3 Replies)
Discussion started by: ammu
3 Replies
2. Shell Programming and Scripting
Ok I have a file with hundreds of lines, four columns, space delimited, TESTB.TXT for example
TESTB.TXT
---
AA ZZ 12 34
BB YY 56 78
CC XX 91 23
DD VV 45 67
---
I want a new file that has 7 columns, the first four are identical, and the next 3 are the last three of the next line...so... (5 Replies)
Discussion started by: ajp7701
5 Replies
3. Shell Programming and Scripting
I'm trying to read an xml file and copy it line by line to another file and want to preserve the tabs.
What i'm trying to do is if I get to a certain line in the xml, I'm going to check to see if the next line is specifically what I want. If it's not, then I want to insert a single line of text... (4 Replies)
Discussion started by: DeuceLee
4 Replies
4. Shell Programming and Scripting
I generally use yy to copy a line and then p to paste the line at end of current line.
But is there a way to paste the copied line in concatenation with the current line with out going to next line. (3 Replies)
Discussion started by: paragkalra
3 Replies
5. Shell Programming and Scripting
I need to take one column of data and put it into the following format:
1st line,2nd line
3rd line,4th line
5th line,6th line
...
Thanks! (6 Replies)
Discussion started by: batcho
6 Replies
6. UNIX for Dummies Questions & Answers
How would you do vim copy line and paste at the beginning, middle, and end of another line. I know yy copies the whole line and p pastes the whole line, but on its own separate line. Sometimes I would like to copy a line to the beginning, middle, or end of another line. I would think this would be... (3 Replies)
Discussion started by: cokedude
3 Replies
7. Shell Programming and Scripting
I am trying to delete lines in archived Apache httpd logs
Each line has the pattern:
<ip-address> - - <date-time> <document-request-URL> <http-response> <size-of-req'd-doc> <referring-document-URL>
This pattern is shown in the example of 6 lines from the log in the code box below. These 6... (1 Reply)
Discussion started by: Proteomist
1 Replies
8. Shell Programming and Scripting
Hi,
I have lines that have pattern like this.
1)
productFamilyGroupIndex < Local.ProductFamilyGroup.capacity))
and
2)
if (local.getProductFamilyGroup().size() >= Local.ProductFamilyGroup.
capacity)
So, If I need to find the pattern
grep '\(< \|>= \)Local.*capacity'... (4 Replies)
Discussion started by: srikanthradix
4 Replies
9. UNIX for Dummies Questions & Answers
Help,
I have a text file which looks like
disco 5674536
3456 jambo
disco 453678
4578 jambo
I would like to have an output which looks like below
disco 3456 disco 4578 (4 Replies)
Discussion started by: Indra2011
4 Replies
10. Shell Programming and Scripting
Hi,
I have an XML file and I am tring to extract some data form it, after lot of data cleaning process, I ended up with an issue, and need your urgent support.
my current input data in below format:
<Node>xxxxxx
<Node>yyyyy</Node>
<Node>zzzzzz
<Node>12345</node>
I need... (9 Replies)
Discussion started by: rramkrishnas
9 Replies
LEARN ABOUT SUSE
menu_post
post(3MENU) post(3MENU)
NAME
post - write or erase menus from associated subwindows
SYNOPSIS
#include <menu.h>
int post_menu(MENU *menu);
int unpost_menu(MENU *menu);
DESCRIPTION
The function post_menu displays a menu to its associated subwindow. To trigger physical display of the subwindow, use refresh or some
equivalent curses routine (the implicit doupdate triggered by an curses input request will do). post_menu resets the selection status of
all items.
The function unpost_menu erases menu from its associated subwindow.
RETURN VALUE
These routines return one of the following:
E_OK The routine succeeded.
E_SYSTEM_ERROR
System error occurred (see errno).
E_BAD_ARGUMENT
Routine detected an incorrect or out-of-range argument.
E_POSTED
The menu has already been posted.
E_BAD_STATE
Routine was called from an initialization or termination function.
E_NO_ROOM
Menu is too large for its window. You should consider to use set_menu_format() to solve the problem.
E_NOT_POSTED
The menu has not been posted.
E_NOT_CONNECTED
No items are connected to the menu.
SEE ALSO
ncurses(3NCURSES), menu(3MENU).
NOTES
The header file <menu.h> automatically includes the header file <curses.h>.
PORTABILITY
These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions.
AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond.
post(3MENU)