Hi,
I need to filter the output of a command and display omitting the first 6 lines and the last two lines..How can i do this using awk.
command | awk ' NR > 7' will omitt the first 6 lines but dont know how to omit the last two lines.. can anyone help? (3 Replies)
Hi I am using the following to get the filename
ls -lrt filename* | tail -1 | awk {'print$9'}
o/p : filename-20101117
want to extract 20101117 from the filename ..
Pls advise (8 Replies)
Hi All,
I have one file name called test.txt and its having numbers inside the file.I need to identified next available number with use of unix shell scipt and have to update next available number with use of unix shell script.
Example:-
cat test.txt
5001
5002
5003
5005
7000
7001
... (5 Replies)
Hi All,
I have one sensor output(over the same) for a set value of 20.
Time(in Sec), Data
1, 16
2, 20
3, 24
4, 22
5, 21
6, 20
7, 19.5
8, 20
9, 20.5
10, 20
11, 20
12, 19.5
Here we can see like after 5 sec of time the data value reaches to 20+-0.5 range.
So I... (7 Replies)
I have a main file:
...
17,466971 0,095185 17,562156 id 676
17,466971 0,096694 17,563665 id 677
17,466971 0,09816 17,565131 id 678
17,466971 0,099625 17,566596 id 679
17,466971 0,101091 17,568062 id 680
17,466971 0,016175 17,483146 id... (4 Replies)
I am trying to re-format a .csv file using awk. I have 6 fields in the .csv file. Some of the fields are enclosed in double quotes and contain comma's inside the quotes. awk is breaking this into multiple fields.
Sample lines from the .csv file:
Device Name,Personnel,Date,Solution... (1 Reply)
Hi all:
How do I use an `awk` like:
awk '{print $1 "\t" $2}' input
on the following input:
<head>medium-n</head> nmod+ns+ns-map-n
<head>future-n</head> of+n-the+ns-map-n
to achieve the following desired output:
medium-n nmod+ns+ns-map-n
future-n of+n-the+ns-map-n (3 Replies)
Hello,
I've got a list of a single column numbers like
3000.66
3002.55
3062.23
3242.12
etc...
I would like to delete all numbers higher than for example 3060.00 and lower
than 2990.00
How can I do that?
Thanks in advance (2 Replies)
Discussion started by: Board27
2 Replies
LEARN ABOUT OPENSOLARIS
filter
filter(3XCURSES) X/Open Curses Library Functions filter(3XCURSES)NAME
filter - disable use of certain terminal capabilities
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>
void filter(void);
DESCRIPTION
The filter() function changes how X/Open Curses initializes terminal capabilities that assume the terminal has more than one line. After a
call to filter(), the initscr(3XCURSES) or newterm(3XCURSES) functions also:
o Disable use of clear, cud, cud1, cup, cuu1, and vpa.
o Set home string to the value of cr.
o Set lines to 1.
RETURN VALUES
The filter() function does not return a value.
ERRORS
None.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO initscr(3XCURSES), libcurses(3XCURSES), newterm(3XCURSES), attributes(5), standards(5)SunOS 5.11 5 Jun 2002 filter(3XCURSES)