On most operating systems, lines in files are terminated by one or two characters that signal the end of the line. The characters vary from system to system. Unix traditionally uses \012 (that is, the octal 12 character in ASCII), one type of DOSish I/O uses \015\012, and Macs uses \015. Perl uses \n to represent a "logical" newline, regardless of platform. In MacPerl, \n always means \015. In DOSish Perls, \n usually means \012, but when accessing a file in "text mode", it is translated to (or from) \015\012, depending on whether you're reading or writing. Unix does the same thing on terminals in canonical mode. \015\012 is commonly referred to as CRLF.
Let's say I want to write a program that run these 4 UNIX commands and redirect output to a file.
#!/usr/local/bin/perl
use strict;
`cd \$HOME > output.txt`;
`cut -f1 inputfile.txt >> output.txt`;
`hostname >> output.txt`;
`ifconfig >> output.txt`;
I want to print a "carriage return"... (5 Replies)
I'm working on making a menu system on an HP-UX box with Bash on it. The old menu system presents the users with a standard text menu with numbers to make selections. I'm re-working the system and I would like to provide something more akin to iterative search in Emacs.
I have a list of 28... (2 Replies)
Hi,
I'm porting an install script from AIX to Red Hat (2.6.18-164.el5 #1 SMP)
I have this script working in both AIX and HP-UX.
The script is a wrapper for a Micro Focus Server Express install program. It responds to the install program questions with a here-now list. Responses includes... (14 Replies)
Hi all,
need your help in replacing carriage return in a record.
Input:
col1|col2|col3|col4|col5|col6|col7|col8|col9|col10
1|aa|bb|cc|dd|eee
eee|ff|ggggg|hh
hhh|iii
2|zz|yy|xx|ww|vv|uu|tt|ss|rr
Output:
col1|col2|col3|col4|col5|col6|col7|col8|col9|col10... (12 Replies)
HI
i have written a script to ask input from the user.
this script should promote the user for y/n input. if user enters anyother input then y/n
the script promotes him again. this below code is working fine for all the cases.
except for space and enter " if i give space and enter it is... (2 Replies)
have three big data file, however I just need to see the mentioned below one line form the all the file which has SERVER_CONNECTION Value
File 1
export SERVER_CONNECTION=//dvlna002:10001/SmartServer
File2
export SERVER_CONNECTION=///SmartServer
File3
export... (1 Reply)
I have an xml file which is generated in a single line an looks like this
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?><Batch_Id="1999996" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><some data....><some data....>closing lines......
I need to have a separate line... (3 Replies)
Discussion started by: vx04
3 Replies
LEARN ABOUT MINIX
zmore
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)