11-13-2000
The printer is not responding the the end-of-line and line-feed symbols in the file. You might consider checking the printer settings and insure that the printer will recognize the control character in the file. You need to know exactly what is the control character used, i.e. CRLF, in the file and insure that the printer will take the right action when receiving the control character. I assume the file is ASCII text?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I try to test the carriage return in a variable.
$ LENGTH=`expr $VARIABLE : ".*"` will return the length of the variable. But this doesn't work if $VARIABLE has zero length.
Any help will be well appreciated.
Thanks in advance.
Giovanni (4 Replies)
Discussion started by: gio123bg
4 Replies
2. Shell Programming and Scripting
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)
Discussion started by: teiji
5 Replies
3. UNIX for Dummies Questions & Answers
hi can anyone please tell me the difference between carriage return, linefeed and newline ? (2 Replies)
Discussion started by: streetfi8er
2 Replies
4. Shell Programming and Scripting
Guys - Simple code, i am trying to get a number back from sqlplus call to a query. After that, i need to use that number in a loop.
---------------------------------
#!/bin/ksh
VALUE=`sqlplus -silent sh/password@sh <<END
set pagesize 0 feedback off verify off heading off echo off
select... (10 Replies)
Discussion started by: sunshine1974
10 Replies
5. Shell Programming and Scripting
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)
Discussion started by: agathaeleanor
12 Replies
6. Shell Programming and Scripting
Hey folks,
I've been working on this for some time. Seems simple, but I'm stumped.
I need the following data format:
New_York:Commercial
Geology
Geophysics
Petrophysics
Production_Engineering
Reservoir_Engineering
Pasadena:Commercial
... (5 Replies)
Discussion started by: leepet01
5 Replies
7. Shell Programming and Scripting
Hello,
How do i usecarriage return in ksh.
I want to do an echo "bla bla" and another echo "bla bla" will appear and replace the first echo on screen.
I tried:
until ; do
echo "bla bla \r"
done
please advice.
Thanks. (3 Replies)
Discussion started by: LiorAmitai
3 Replies
8. Shell Programming and Scripting
I have a CSV with carriage returns in place of newlines. I am trying to use tr to remove them, but it isn't working.
Academic year,Term,Course name,Period,Last name,Nickname
2012-2013,First Semester,English 12,4th Period,Arnold,Adam
2012-2013,First Semester,English 12,4th Period,Adams,Jim... (1 Reply)
Discussion started by: nextyoyoma
1 Replies
9. Shell Programming and Scripting
Hello all,
I've a flat file in the following format:
AB\001\CDED\001\ABC\001\nEG\001\HIJF\001\EFG\001\nHI\003\HIUL\003\HIJ\003
And I want to substitute \n with the carriage return. Any help is appreciated!
Regards,
- Seth (8 Replies)
Discussion started by: sethmj
8 Replies
10. UNIX for Dummies Questions & Answers
I need to remove the carriage return comes inbetween the record.
Need to have CR only at the end.
I used the below command.
tr -d '\n' < filewithcarriagereturns > filewithoutcarriagereturns
But its removing all the CR and giving one line output.
Input File:
12345
abcdegh... (11 Replies)
Discussion started by: srvn_saru
11 Replies
asa(1) User Commands asa(1)
NAME
asa - convert FORTRAN carriage-control output to printable form
SYNOPSIS
asa [-f] [file...]
DESCRIPTION
The asa utility will write its input files to standard output, mapping carriage-control characters from the text files to line-printer con-
trol sequences.
The first character of every line will be removed from the input, and the following actions will be performed.
If the character removed is:
SPACE The rest of the line will be output without change.
0 It is replaced by a newline control sequence followed by the rest of the input line.
1 It is replaced by a newpage control sequence followed by the rest of the input line.
+ It is replaced by a control sequence that causes printing to return to the first column of the previous line, where the rest of
the input line is printed.
For any other character in the first column of an input line, asa skips the character and prints the rest of the line unchanged.
If asa is called without providing a filename, the standard input is used.
OPTIONS
The following option is supported:
-f Start each file on a new page.
OPERANDS
The following operand is supported:
file A pathname of a text file used for input. If no file operands are specified, or `-' is specified, then the standard input will be
used.
EXAMPLES
The command
a.out | asa | lp
converts output from a.out to conform with conventional printers and directs it through a pipe to the printer.
The command
asa output
shows the contents of file output on a terminal as it would appear on a printer.
The following program is used in the next two examples:
write(*,'(" Blank")')
write(*,'("0Zero ")')
write(*,'("+ Plus ")')
write(*,'("1One ")')
end
Both of the following examples produce two pages of output:
Page 1:
Blank
ZeroPlus
Page 2:
One
Example 1: Using actual files
a.out > MyOutputFile
asa < MyOutputFile | lp
Example 2: Using only pipes
a.out | asa | lp
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of asa: LANG, LC_ALL, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 All input files were output successfully.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
lp(1), attributes(5), environ(5), standards(5)
SunOS 5.10 18 Apr 1995 asa(1)