07-25-2002
Use cat instead of more - it has options to put in line numbers
Example:
%cat -n fine.scr |lp -dtpadc-5si
Options for cat :
-n Precede each line output with its line number.
-b Number the lines, as -n, but omit the line numbers from
blank lines.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,
I have got a file which doesn't have the same number of columns in each line. I would like to print the second column and the one that begins with 33= and has some numbers after '33='
Can you please help me asap?
Cheers (7 Replies)
Discussion started by: alexandra_ola
7 Replies
2. Shell Programming and Scripting
Hi
I am writing a script that will produce the total of the digits with in the number. Here is the script.
-bash# cat Sum_Digits
if
then
echo "You must enter at least two digits"
echo "If you enter more than two digits after the base line program this script will print the sum of the... (4 Replies)
Discussion started by: chrs0302
4 Replies
3. UNIX for Dummies Questions & Answers
Hi Experts,
Need help on printing of numbers, which are missing in the range.
Pls find the details below
Input
1000000002
1000000007
1234007940
1234007946
Output
1000000003
1000000004
1000000005
1000000006
1234007941 (2 Replies)
Discussion started by: krao
2 Replies
4. Shell Programming and Scripting
I am trying to get folder names that contain only numbers.
Can someone explain why following command is printing 'total 450' as part of output..
$> ls -lt | awk '$9 ~ /^*$/' | more
total 450
drwxr-x--x 3 user1 group1 512 Mar 9 2008 329227163
drwxr-x--x 3 user1 group1 ... (17 Replies)
Discussion started by: kchinnam
17 Replies
5. UNIX for Dummies Questions & Answers
Dear All,
I am trying to sort an array of numbers to retrieve the mimimum and maximum values of numbers in that array, by printing the first and last elements of the sorted array. My code is @sorted_numbers = sort (@numbers);
print "@sorted_numbers\n";
print "$sorted_numbers,... (0 Replies)
Discussion started by: pawannoel
0 Replies
6. Homework & Coursework Questions
Florida State University, Tallahassee, FL, USA, Dr. Whalley, COP4342 Unix Tools.
This program takes much of my previous assignment but adds the functionality of printing the concatenated line numbers found within the input.
Sample input from <> operator:
Hello World
This is hello
a sample... (2 Replies)
Discussion started by: D2K
2 Replies
7. Homework & Coursework Questions
Florida State University, Tallahassee, FL USA, Dr. Whalley, COP4342
1. The problem statement, all variables and given/known data:
Create a lex specification file that reads a C source program that ignores keywords and collects all identifiers (regular variable names) and also displays the line... (3 Replies)
Discussion started by: D2K
3 Replies
8. Shell Programming and Scripting
I have some files named file1, file2, fille3......etc. These files are in a folder f1. The content of files are shown below. I would like to count the unique pairs of third column in each file. some files have no data. It should be printed as zero. Your help would be appreciated.
file1
ARG... (1 Reply)
Discussion started by: samra
1 Replies
9. Shell Programming and Scripting
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
lpr(1) Apple Inc. lpr(1)
NAME
lpr - print files
SYNOPSIS
lpr [ -E ] [ -H server[:port] ] [ -U username ] [ -P destination[/instance] ] [ -# num-copies [ -h ] [ -l ] [ -m ] [ -o option[=value] ] [
-p] [ -q ] [ -r ] [ -C/J/T title ] [ file(s) ]
DESCRIPTION
lpr submits files for printing. Files named on the command line are sent to the named printer (or the default destination if no destination
is specified). If no files are listed on the command-line, lpr reads the print file from the standard input.
THE DEFAULT DESTINATION
CUPS provides many ways to set the default destination. The "LPDEST" and "PRINTER" environment variables are consulted first. If neither
are set, the current default set using the lpoptions(1) command is used, followed by the default set using the lpadmin(8) command.
OPTIONS
The following options are recognized by lpr:
-E
Forces encryption when connecting to the server.
-H server[:port]
Specifies an alternate server.
-C "name"
-J "name"
-T "name"
Sets the job name.
-P destination[/instance]
Prints files to the named printer.
-U username
Specifies an alternate username.
-# copies
Sets the number of copies to print from 1 to 100.
-h
Disables banner printing. This option is equivalent to "-o job-sheets=none".
-l
Specifies that the print file is already formatted for the destination and should be sent without filtering. This option is equivalent
to "-o raw".
-m
Send an email on job completion.
-o option[=value]
Sets a job option.
-p
Specifies that the print file should be formatted with a shaded header with the date, time, job name, and page number. This option is
equivalent to "-o prettyprint" and is only useful when printing text files.
-q
Hold job for printing.
-r
Specifies that the named print files should be deleted after printing them.
COMPATIBILITY
The "c", "d", "f", "g", "i", "n", "t", "v", and "w" options are not supported by CUPS and produce a warning message if used.
SEE ALSO
cancel(1), lp(1), lpadmin(8), lpoptions(1), lpq(1), lprm(1), lpstat(1),
http://localhost:631/help
COPYRIGHT
Copyright 2007-2009 by Apple Inc.
29 August 2008 CUPS lpr(1)