Hi,
Suppose I have a file with many lines as follows. Now I want to find the following questions from the file through shell script or commands.
Now, (i) How many occurrences of XYZ are there?
(ii) Print lines where XYZ occurrence is more than 1.
(iii) Print lines which start with XYZ
(iv) Print lines which end with XYZ
(v) Print lines which doesn't have XYZ
Thanks for the inputs.
Moderator's Comments:
edit by bakunin: this is obviously homework and - as you should know from the rules you promised to read and accept - for homework special provisions apply. You have to post this at the Homework board, here it neither allowed to ask nor to answer.
Hi,
I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.
Note:These are the samples of two files,but i can have more... (2 Replies)
Hi,
I have two files viz,
rak1:
$ cat rak1
rak2:
$ cat rak2
sdiff rak1 rak2 returns:
I want the lines that got modified, changed, or deleted preceding with the section they are in.
I have done this so far: (1 Reply)
Hi,
I have the below content in file:
<xmlfile> ows_Body="Hi" ows_Title="Title" ows_Author="krishna" </xmlfile>
I wanted to remove ows_Body content from the file.
I am using the below code
sed -e 's/ows_Body.*ows/ows/g'
Giving output: (9 Replies)
I am interested in finding a pattern that looks like this
AABBACC
These letters are just for example but they can be any letter in the alphabet as long as they are different from each other, but the letter found in a certain spot should act like in the pattern above.
Thanks! (7 Replies)
Hi,
i need some help regarding finding a pattern in files inside a direstory.
i have these files
abc123.txt
cemj111.txt
ckmem.txt
cmick.txt
crnnc.txt
montt.txt
xyz123.txt
dfd123.txt
cvv123.txt
i need to find the files with name "*123.txt" which does not contain a perticular... (2 Replies)
i have little challenge, help me out.i have a file where i have a value declared and and i have to replace the value when called. for example i have the value for abc and ccc. now i have to substitute the value of
value abc and ccc in the place of them.
Input File:
go to &abc=ddd;
if... (16 Replies)
Hi,
I've to find the file which has the pattern
"Delete Report for History Tables"
and need to search this file pattern from directory which has sub directories as well.
I'm using ksh 88
Please suggest me which command will be used to find the file pattern .
Thanks. (1 Reply)
I have a file like below.
2018.07.01, Sunday
09:27 some text 123456789 0 21 0.06 0.07 0.00
2018.07.02, Monday
09:31 some text 123456789 1 41 0.26 0.32 0.00
09:39 some text 456789012 1 0.07 0.09 0.09
09:45 some text 932469494 1 55 0.29 0.36 0.00
16:49 some text 123456789 0 48 0.12 0.15 0.00... (9 Replies)
Discussion started by: father_7
9 Replies
LEARN ABOUT OPENSOLARIS
scroll
scrl(3XCURSES) X/Open Curses Library Functions scrl(3XCURSES)NAME
scrl, scroll, wscrl - scroll a window
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 scrl(int n);
int scroll(WINDOW *win);
int wscrl(WINDOW *win, int n);
PARAMETERS
n number and direction of lines to scroll
win pointer to the window in which to scroll
DESCRIPTION
The scroll() function scrolls the window win up one line. The current cursor position is not changed.
The scrl() and wscrl() functions scroll the window stdscr or win up or down n lines, where n is a positive (scroll up) or negative (scroll
down) integer.
The scrollok(3XCURSES) function must be enabled for these functions to work.
RETURN VALUES
On success, these functions return OK. Otherwise, they return ERR.
ERRORS
None.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO clearok(3XCURSES), libcurses(3XCURSES), attributes(5), standards(5)SunOS 5.11 5 Jun 2002 scrl(3XCURSES)