Hi, I'm trying to find the position of a series of numbers within a large text file. The numbers are separated by spaces.
This works fine:
But this does not:
I get this error:
I'm looking for very specific numbers, so no regex needed. What's the proper incantation for a series of numbers?
Gawk is being called by another script, which is why I'm looking for a 1-liner.
I'm using GNU utilities for Win32, and I'm on Vista. The double-quotes are correct for Windows. Also, I have no particular preference for Awk and can use any other Unix util like Grep, Sed, Tr or whatever.
Thanks,
Lemming.
Last edited by pludi; 07-12-2010 at 09:33 AM..
Reason: code tags, please...
HI All
Im new to shell scripting...kindly plz help me...
I need a shell script for:
We have to take export of all db's on daily basis from all svr's and keep these export backups on diffrent server.
Plz help.
Regards
Gaurav (5 Replies)
I need a script for...
how to find a position of column data and print some string in the next line and same position
position should find based on *HEADER8* in text
for ex: ord123 abs 123 987HEADER89 test234
ord124 abc 124 987HEADER88 test235
... (1 Reply)
Hi,
I am a newbie in unix programming so maybe this is a simple question.
I would like to know how can I make a script that outputs only the values that are not between any given start and end positions
Example
file1:
2 30
40 80
82 100
file2:
ID1 1
ID2 35
ID3 80
ID4 81
ID6... (9 Replies)
Hi All,
I have a file containg lines along the likes of:
18:02:00 JOB02084722
18:09:00 2010120942
18:12:04 JOB02084723
18:34:16 20100709
etc.
What I want to do is remove the entire line when field 2 starts with a number so I'm left with:
18:02:00 JOB02084722
18:12:04... (8 Replies)
I want to remove text from nth position to nth position couple of times in same line
my line is
"hello is there anyone can help me with this question"
I need like this
ello is there anyone can help me with question
'h' is removed and 'this' removed from the line. I want to do this... (5 Replies)
Thanks for giving your time and effort to answer questions and helping newbies like me understand awk.
I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk.
Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
i want to remove *.req files from directory
/opt/FFCL8001/oracle/inst/apps/FFCL8001_lhrho/logs/appl/conc/log
i executed command find . -name '*.req' -mtime +2 -exec rm {} \;
but it is running since hours and free space in /opt is same as old 7.4 GB .
why it is not removing files ? (5 Replies)
Hi Guys!
Could anyone help me with?..
I have a line which says
BCVGF%6$#900 .....How can we know which position is for % or say $ by command or script?There is any way to get a prompt by any script?
Thanks a lot (6 Replies)
Discussion started by: Indra2011
6 Replies
LEARN ABOUT SUNOS
mvinnstr
innstr(3XCURSES) X/Open Curses Library Functions innstr(3XCURSES)NAME
innstr, instr, mvinnstr, mvinstr, mvwinnstr, mvwinstr, winnstr, winstr - retrieve a multibyte character string (without rendition)
SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib
-R /usr/xpg4/lib -lcurses [ library... ]
c89 [ flag... ] file... -lcurses [ library... ]
:#include <curses.h>
int innstr(char *str, int n);
int instr(char *str);
int mvinnstr(int y, int x, char *str, int n);
int mvinstr(int y, int x, char *str);
int mvwinnstr(WINDOW *win, int y, int x, char *str, int n);
int mvwinstr(WINDOW *win, int y, int x, char *str);
int winstr(WINDOW *win, char *str);
int winnstr(WINDOW *win, char *str, int n);
PARAMETERS
str Is a pointer to an object that can hold the retrieved multibyte character string.
n Is the number of characters not to exceed when retrieving str.
y Is the y (row) coordinate of the starting position of the string to be retrieved.
x Is the x (column) coordinate of the starting position of the string to be retrieved.
win Is a pointer to the window in which the string is to be retrieved.
DESCRIPTION
The instr() and winstr() functions retrieve a multibyte character string (without attributes) starting at the current cursor position of
the stdscr window and window win, respectively, and ending at the right margin. The mvinstr() and mvwinstr() functions retrieve a multibyte
character string located at the position indicated by the x (column) and y (row) parameters (the former in the stdscr window; the latter
in window win).
The innstr(), winnstr(), mvinnstr(), and mvwinnstr() functions retrieve at most n characters from the window stdscr and win, respec-
tively. The former two functions retrieve the string starting at the current cursor position; the latter two commands return the string,
starting at the position specified by the x and y parameters.
All these functions store the retrieved string in the object pointed to by str. They only store complete multibyte characters. If the
area pointed to by str is not large enough to hold at least one character, these functions fail.
Only the character portion of the character/rendition pair is returned. To return the complete character/rendition pair, use winchstr().
ERRORS
OK Successful completion.
ERR An error occurred.
USAGE
All functions except winnstr() may be macros.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO inch(3XCURSES), inchstr(3XCURSES), libcurses(3XCURSES), attributes(5), standards(5)SunOS 5.10 5 Jun 2002 innstr(3XCURSES)