Sponsored Content
Homework and Emergencies Homework & Coursework Questions Help with using different types of GREP Post 302576380 by vbe on Thursday 24th of November 2011 12:38:17 PM
Old 11-24-2011
Or is it not in relation with the search pattern facility incorporated in vi?
from vi man pages ( type man vi
Quote:
/ Read a string from the last line on the screen,
interpret it as a regular expression, and scan
forward for the next occurrence of a matching string.
The search begins when the user types a carriage
return to terminate the pattern; the search can be
terminated by sending SIGINT (or the user-designated
interrupt character).
Truly, if you are willing to learn UNIX even a minimum then it is far from being a waste of time learning vi basics (I installed a vi on my DOS pc at the time... and am completely lost when there is no vi...).
So start by reading the man pages and come back here for more explanation
There are plenty options in vi... even using s ( like sed...) for substitution...
This User Gave Thanks to vbe For This Post:
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

backup types

can anyone explain me difference between tar and ufsdump commands.............and also i wd like to know the difference between incremental and differential backup......... thx in advance (1 Reply)
Discussion started by: girish_shukla
1 Replies

2. UNIX for Dummies Questions & Answers

Two types of pipes?

What is the difference between: cd /tmp tar -cf - *.txt |gzip > tmp_txt.tar.gz and cd /tmp mknod pipe p gzip < pipe > /tmp/tmp_txt1.tar.gz & tar -cf pipe *.txt Apart from the fact that we have to create the pipe file manually, is there any difference in the performance of the two?... (5 Replies)
Discussion started by: blowtorch
5 Replies

3. UNIX for Dummies Questions & Answers

mime types

Hi, I am trying to launch an ogg movie from a pdf file which has been produced with pdflatex and \movie {\centerline{\includegraphics {grafiques_xerrades/un_manolo_amb_camera.pdf}}} {hlims_xerrades/XocCumuls.ogg} The switch "externalviewer" makes kpdf launch the default... (5 Replies)
Discussion started by: pau
5 Replies

4. UNIX for Dummies Questions & Answers

How do I grep in specific file types?

I have a directory with file types ending .log, .mml, .gll, .dll . How can I grep expressions only in say the .log files? (3 Replies)
Discussion started by: bbbngowc
3 Replies

5. Programming

enumeration types in C

If I want to declare an array of structures in C and have the number of items in that array to correspond to the items of an enumeration, is there a way to access the maximum value in the enumeration when declaring the array? For instance: typedef struct { various fields.... } ... (3 Replies)
Discussion started by: cleopard
3 Replies

6. What is on Your Mind?

What Types of Food Do You Like The Most?

On another simple topic, multiple choice answers OK ( you can pick more than one or suggest others - we will add your suggestions to the poll ). What Types of Food Do You Like The Most? (27 Replies)
Discussion started by: Neo
27 Replies

7. Shell Programming and Scripting

Cp -r except certain file types

the following excludes certain directories successfully cp -r probe/!(dir) /destination I want to exclude certain file types and tried unsuccessfully cp -r probe/!(*.avi) /destination (2 Replies)
Discussion started by: tmf
2 Replies

8. UNIX for Advanced & Expert Users

Recursive grep with only certain types of files

Can I please have some ideas on how to do a recursive grep with certain types of files? The file types I want to use are *.c and *.java. I know this normally works with all files. grep -riI 'scanner' /home/bob/ 2>/dev/null Just not sure how to get it to work *.c and *.java files. (5 Replies)
Discussion started by: cokedude
5 Replies
BZMORE(1)						      General Commands Manual							 BZMORE(1)

NAME
bzmore, bzless - file perusal filter for crt viewing of bzip2 compressed text SYNOPSIS
bzmore [ name ... ] bzless [ name ... ] NOTE
In the following description, bzless and less can be used interchangeably with bzmore and more. DESCRIPTION
Bzmore is a filter which allows examination of compressed or plain text files one screenful at a time on a soft-copy terminal. bzmore works on files compressed with bzip2 and also on uncompressed files. If a file does not exist, bzmore looks for a file of the same name with the addition of a .bz2 suffix. Bzmore normally pauses after each screenful, printing --More-- at the bottom of the screen. If the user then types a carriage return, one more line is displayed. If the user hits a space, another screenful is displayed. Other possibilities are enumerated later. Bzmore looks in the file /etc/termcap to determine terminal characteristics, and to determine the default window size. On a terminal capa- ble of displaying 24 lines, the default window size is 22 lines. Other sequences which may be typed when bzmore pauses, and their effects, are as follows (i is an optional integer argument, defaulting to 1) : i<space> display i more lines, (or another screenful if no argument is given) ^D display 11 more lines (a ``scroll''). If i is given, then the scroll size is set to i. d same as ^D (control-D) iz same as typing a space except that i, if present, becomes the new window size. Note that the window size reverts back to the default at the end of the current file. is skip i lines and print a screenful of lines if skip i screenfuls and print a screenful of lines q or Q quit reading the current file; go on to the next (if any) e or q When the prompt --More--(Next file: file) is printed, this command causes bzmore to exit. s When the prompt --More--(Next file: file) is printed, this command causes bzmore to skip the next file and continue. = Display the current line number. i/expr search for the i-th occurrence of the regular expression expr. If the pattern is not found, bzmore goes on to the next file (if any). Otherwise, a screenful is displayed, starting two lines before the place where the expression was found. The user's erase and kill characters may be used to edit the regular expression. Erasing back past the first column cancels the search command. in search for the i-th occurrence of the last regular expression entered. !command invoke a shell with command. The character `!' in "command" are replaced with the previous shell command. The sequence "!" is replaced by "!". :q or :Q quit reading the current file; go on to the next (if any) (same as q or Q). . (dot) repeat the previous command. The commands take effect immediately, i.e., it is not necessary to type a carriage return. Up to the time when the command character itself is given, the user may hit the line kill character to cancel the numerical argument being formed. In addition, the user may hit the erase character to redisplay the --More-- message. At any time when output is being sent to the terminal, the user can hit the quit key (normally control-). Bzmore will stop sending out- put, and will display the usual --More-- prompt. The user may then enter one of the above commands in the normal manner. Unfortunately, some output is lost when this is done, due to the fact that any characters waiting in the terminal's output queue are flushed when the quit signal occurs. The terminal is set to noecho mode by this program so that the output can be continuous. What you type will thus not show on your termi- nal, except for the / and ! commands. If the standard output is not a teletype, then bzmore acts just like bzcat, except that a header is printed before each file. FILES
/etc/termcap Terminal data base SEE ALSO
more(1), less(1), bzip2(1), bzdiff(1), bzgrep(1) BZMORE(1)
All times are GMT -4. The time now is 05:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy