Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Help using head cmd, print 20 then the next 20 etc Post 302729301 by joeyg on Friday 9th of November 2012 12:07:08 PM
Old 11-09-2012
Unsure fo your request

The 'more' command displays a screenful of data. And there are options to control how much data, or how many lines.
The 'head' command will display the first x number of lines. There are options to start at a particular line number.

You need to proved more info and samples.
This User Gave Thanks to joeyg For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help.. I am in way over my head !!!!

my boss has done it again I have been sent to fix a unix issue and I ma hoping you can help three issues 1st. I have a printer that when you try to print to it the print job comes out on a diffrent printer. If I take the printer ( dot matrix thourgh a serail connection) to a diffrent local the... (3 Replies)
Discussion started by: oberon42
3 Replies

2. UNIX for Dummies Questions & Answers

man <cmd> >> cmd.txt

I've noticed most of my postings here are because of syntax errors. So I want to begin compiling a large txt file that contains all the "man <cmd>" of the commands I most have problems with. I ran a "man nawk >> nawk.txt" but it included a header/footer on each "page". Anyone know how I'd be... (6 Replies)
Discussion started by: yongho
6 Replies

3. Shell Programming and Scripting

head command

Hi All, How can the head command be used to extract only a particular line. By default head -n filename displays the first n lines. I want only the nth line. I couldn't get it from forum search. Thanks, Sumesh (6 Replies)
Discussion started by: sumesh.abraham
6 Replies

4. Shell Programming and Scripting

head usage

$ct=1 head -n $ct file. When i used like this, i got an error , Bad usage of head Cant we use variables in place of number in HEAD. In my requirement for every iteration i should increase the number in Head and tail the last one. HOw can i achieve this (5 Replies)
Discussion started by: vasuarjula
5 Replies

5. Shell Programming and Scripting

head followed by variable??

I know that the common use of head is for example head -3 etc.Is there any possibility that,if i have a variable that equals to an integer(i=5),i can write head -i?? If not,what syntax or commands should i write down in order to have the same result? //maybe something lik head -"$variable" ? (2 Replies)
Discussion started by: bashuser2
2 Replies

6. OS X (Apple)

Help with head -q option on Mac OS X

I am trying to run a csh script (this is usually done on my Linux machine but it died, so I had to resort to a Mac :eek:) and I received the following error message: head: illegal option --q My script takes multiple files as the input, concatenates them and produces a single file as the... (4 Replies)
Discussion started by: mac_novice
4 Replies

7. UNIX for Dummies Questions & Answers

find and head -1

i have lots of files in /law/prod and /law/dev, such as AP20PD, AP20WS, AP20.scr, AP20.rpt if i am in /law DIR find . -name AP20PD, found in /law/prod and /law/dev i want to head -1 AP20PD from both location and >> /tmp/test.log can i use find and head in one line ? ----------... (1 Reply)
Discussion started by: tjmannonline
1 Replies

8. Shell Programming and Scripting

Unix cmd prompt how to get old cmd run?

Hi, I am using SunOS I want to serch my previous command from unix prompt (like on AIX we can search by ESC -k) how to get in SunOs urgent help require. (10 Replies)
Discussion started by: RahulJoshi
10 Replies

9. Shell Programming and Scripting

Perl open(CMD, "cmd |"); buffering problem..

Hello, There's a third-party application's command that shows the application's status like "tail -f verybusy.log". When use the command, the output comes every 1-sec. but when it goes in a script below the output comes every 8-sec...What is the problem and how can I fix it? open(CMD,... (2 Replies)
Discussion started by: Shawn, Lee
2 Replies

10. Shell Programming and Scripting

Cmd="grep 'Name:' |awk -F' ' '{print $2}'"

Hi Is it possible to get the below code working.? cmd="grep 'Name:' |awk -F' ' '{print $2}'|xargs -i basename {}" echo $cmd ( rman target / <<EOF1 LIST COPY ; exit EOF1 ) | `$cmd` in nutshell I want to be able to preset cmd as depending on script flow it can be... (2 Replies)
Discussion started by: zam
2 Replies
ZMORE(1)						      General Commands Manual							  ZMORE(1)

NAME
zmore - file perusal filter for crt viewing of compressed text SYNOPSIS
zmore [ name ... ] DESCRIPTION
Zmore is a filter which allows examination of compressed or plain text files one screenful at a time on a soft-copy terminal. zmore works on files compressed with compress, pack or gzip, and also on uncompressed files. If a file does not exist, zmore looks for a file of the same name with the addition of a .gz, .z or .Z suffix. Zmore 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. Zmore 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. To use a pager other than the default more, set environment variable PAGER to the name of the desired program, such as less. Other sequences which may be typed when zmore 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. is skip i lines and print a screenful of lines if skip i screenfuls and print a screenful of lines q or Q Quit. = Display the current line number. i/expr search for the i-th occurrence of the regular expression expr. 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" is replaced with the previous shell command. The sequence "!" is replaced by "!". :q or :Q Quit (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-). Zmore will stop sending output, 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 sig- nal 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 zmore acts just like zcat, except that a header is printed before each file if there is more than one file. FILES
/etc/termcap Terminal data base SEE ALSO
more(1), gzip(1), zdiff(1), zgrep(1), znew(1), zforce(1), gzexe(1) ZMORE(1)
All times are GMT -4. The time now is 12:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy