07-26-2008
Have you tried the less command as Yogesh Sawant mentioned?
There are a lot of options to scroll within a file with less. You can search for patterns in your file with /pattern.
To go to line 50 you can type 50g, with 100 you can scroll 100 lines down etc.
Read the manpage of less for other options.
Regards
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i.e configuration of C compiler :confused: (4 Replies)
Discussion started by: atiato
4 Replies
2. Windows & DOS: Issues & Discussions
At the dos command prompt, does anyone remember how to make it recognize long file names? ie, windows long file names for folders, my documents, if i'm at the :> prompt and want to change to that directory, how do i make it skip the space? I've tried cd "my document" cd my\documents cd 'my... (4 Replies)
Discussion started by: kymberm
4 Replies
3. UNIX for Dummies Questions & Answers
im trying to open a file in my bin directory and the farthest i can get is into the folder but not the actual file itself i use text edit as the editor. when i try to open the file it says it doesn't exist here is what i type
cd bin
open cmnds (dir. which it is under)
open test
no such... (4 Replies)
Discussion started by: hiei
4 Replies
4. Shell Programming and Scripting
If someone out there could help me out with this problem. I would really appreciate it.
I am trying to convert xml into text file(fixed length) using Unix Borne shell scripts.
My xml file:
<root>
<header_rec recordtype="00">
<record_id>00</record_id>
<country_code>AK></country_code>... (0 Replies)
Discussion started by: ram2s2001
0 Replies
5. Shell Programming and Scripting
i have a file in unix having data like
cat
dog
(having spaces in the beginning)
when i read it in a shell script
cat file_name |while read line
do
echo $line
done
it will print
cat
dog
spaces at the beginning are removed....
i dont want these spaces to be... (2 Replies)
Discussion started by: Amardeep
2 Replies
6. Shell Programming and Scripting
Hi,
I want to check whether file has EOL or NOEOL before opening this file in VI editor. My file is very big its in terms of 15-20 MB.
I am using ksh for this.
When we opened the file in vi editor, normally at last line we are able to see whether this is eol or noeol file. But i does want... (1 Reply)
Discussion started by: HariRaju
1 Replies
7. Shell Programming and Scripting
:)Hi guys,
I have written a script that returns 3 things of all the employees in my organisation. i.e. Name, Login time & log out time of each and every employee. It returns the output in pipe-delimited format. For your ref. sending a small sample
e.g.
Deepti|083032|174501... (5 Replies)
Discussion started by: anushree.a
5 Replies
8. Shell Programming and Scripting
Hey friends, below mentioned script is giving me proper o/p which can be 1 or 2
echo select status_ac from db_acct where acct_num='$1'" | dbaccess elstest
Now I want to interpret the o/p as follows.
If o/p is 1 then YES
If o/p is 2 then No
And to do this I have modified above... (2 Replies)
Discussion started by: anushree.a
2 Replies
9. Shell Programming and Scripting
Dear All,
this is my first post on this Forum, glad to be here.
I'm trying to fix an .ods file. Yes, I had a backup, but it's also corrupted.
When opening the document I get this EM:
read error
format error discovered in the file in sub-document content.xml at
2,337040(row,col).
So I... (3 Replies)
Discussion started by: jameslast
3 Replies
10. Shell Programming and Scripting
Hi friends,
In my shell script, I want to open a file using vi editor. After opening the file in vi, I want to save and quit this file automatically.... all through shell script.
the code segment is:
------------------------------------------------------------
cd ~/netfpga/projects/scone/sw/... (2 Replies)
Discussion started by: sachinteotia
2 Replies
scroll(3NCURSES) scroll(3NCURSES)
NAME
scroll, scrl, wscrl - scroll a curses window
SYNOPSIS
#include <curses.h>
int scroll(WINDOW *win);
int scrl(int n);
int wscrl(WINDOW *win, int n);
DESCRIPTION
The scroll routine scrolls the window up one line. This involves moving the lines in the window data structure. As an optimization, if
the scrolling region of the window is the entire screen, the physical screen may be scrolled at the same time.
For positive n, the scrl and wscrl routines scroll the window up n lines (line i+n becomes i); otherwise scroll the window down n lines.
This involves moving the lines in the window character image structure. The current cursor position is not changed.
For these functions to work, scrolling must be enabled via scrollok.
RETURN VALUE
These routines return ERR upon failure, and OK (SVr4 only specifies "an integer value other than ERR") upon successful completion.
X/Open defines no error conditions.
This implementation returns an error if the window pointer is null, or if scrolling is not enabled in the window, e.g., with scrollok.
NOTES
Note that scrl and scroll may be macros.
The SVr4 documentation says that the optimization of physically scrolling immediately if the scroll region is the entire screen "is" per-
formed, not "may be" performed. This implementation deliberately does not guarantee that this will occur, to leave open the possibility of
smarter optimization of multiple scroll actions on the next update.
Neither the SVr4 nor the XSI documentation specify whether the current attribute or current color-pair of blanks generated by the scroll
function is zeroed. Under this implementation it is.
PORTABILITY
The XSI Curses standard, Issue 4 describes these functions.
SEE ALSO
ncurses(3NCURSES), outopts(3NCURSES)
scroll(3NCURSES)