Sponsored Content
Full Discussion: No newline at end of file
Top Forums Shell Programming and Scripting No newline at end of file Post 303023969 by jgt on Wednesday 26th of September 2018 12:55:42 PM
Old 09-26-2018
Quote:
Originally Posted by MadeInGermany
Yes, because a missing newline is a violation in Unix, and cause problems with many text processing tools.

On the other hand, a file without newlines containing printer escape sequences can be prefixed to a (plain text) print file without adding lines to the file and changing the page format.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to convert ^M appearing at end of line to unix newline?

How to convert ^M appearing at end of line to unix newline? As I have tried with ^M in 'tr' it replaced ^ to a newline. Thanks in advance. (21 Replies)
Discussion started by: videsh77
21 Replies

2. Shell Programming and Scripting

Append newline at the file end

Hi All, Is there any way to append a newline character at the end of a file(coma-separated file), through shell script? I need to check whether newline character exists at the end of a file, if it does not then append it. Regards, Krishna (1 Reply)
Discussion started by: KrishnaSaran
1 Replies

3. Shell Programming and Scripting

How to remove a newline character at the end of filename

Hi All, I have named a file with current date,time and year as follows: month=`date | awk '{print $2}'` date=`date | awk '{print $3}'` year=`date | awk '{print $6}'` time=`date +%Hh_%Mm_%Ss'` filename="test_"$month"_"$date"_"$year"_"$time".txt" > $filename The file is created with a... (2 Replies)
Discussion started by: amio
2 Replies

4. Shell Programming and Scripting

Add end of char \n on end of file

Hi, I want to add \n as a EOF at the end of file if it does't exist in a single command. How to do this? when I use command echo "1\n" > a.txt and od -c a.txt 0000000 1 \n \n 0000003 How does it differentiate \n and eof in this case? Regards, Venkat (1 Reply)
Discussion started by: svenkatareddy
1 Replies

5. Shell Programming and Scripting

How to enter a newline after every XML tag end?

Hi Guyz, I have an XML message in following format: I want my contents to be formatted in following order: i.e. I want a newline after every XML tag end. How to do this? Thnx in advance. (5 Replies)
Discussion started by: DTechBuddy
5 Replies

6. Shell Programming and Scripting

Newline characters in fields of a file

My source file is pipe delimeted file with 53 fields.In 33 rd column i am getting mutlple new line characters,dule to that record is breaking into multiple records. Note : here record delimter also \n sample Source file with 6 fields : 1234|abc| \nabcd \n bvd \n cde \n |678|890|900\n ... (6 Replies)
Discussion started by: lakshmi001
6 Replies

7. Shell Programming and Scripting

How to add newline character at end of file?

Hi All, I have following piece of code in UNIX C Shell script and I want to add one more command which can add newline at the end of file only if there is no newline character exists. foreach file (`ls $dd_PLAYCARD_EDI_IN`) if ( -f $dd_PLAYCARD_EDI_IN/${file} ) then cat -n... (4 Replies)
Discussion started by: jnrohit2k
4 Replies

8. Shell Programming and Scripting

Appending newline character End of File

Hi Gurus, Need help. I'm a beginner in Unix. I have a requirement, need to add or append newline (\n) character in file. Sample Data: 1|Main|Test|~# 2|Main|Hello|~# 3|Main|Unix|~# 4|Main|File|~#Output: 1|Main|Test|~# 2|Main|Hello|~# 3|Main|Unix|~# 4|Main|File|~#\n -- append only... (13 Replies)
Discussion started by: Gouri Solleti
13 Replies

9. Shell Programming and Scripting

Warning while sorting : A newline character was added to the end of file

Hi, I am trying to sort a csv file which has say 10 lines each line having a row size that is upto 30183 no. of COLUMNS (Row length = 30183). There is a LINE FEED (LF) at the end of each line. When I try to sort this file say, based on the second FIELD using the below command, sort -t ',' +1... (5 Replies)
Discussion started by: DHeisenberg
5 Replies

10. Shell Programming and Scripting

Newline in the file

I have requirement to remove the /n ( newline ) characters from the file. When I open file in VI .. I want to see newline char how to display newline char .. or where can I see the content with newline char visible? (3 Replies)
Discussion started by: freakabhi
3 Replies
ln03jaof(8)						      System Manager's Manual						       ln03jaof(8)

NAME
ln03jaof - Filter for the Japanese LN03S-JA printer SYNOPSIS
/usr/lbin/ln03jaof [-c] [-h host] [-i indent] [-l length] [-L locale] [-n login] [-w width] [accounting_file] OPTIONS
Prints control characters. Specifies the host name of the job owner. This name can contain Japanese characters. Specifies the amount of indentation. The default value is no (no indentation). Specifies the page length in lines. The default value is 66. Specifies the printer codeset. This value must be a valid locale name. The default value is ja_JP.deckanji. Specifies the login name of the job owner. This name can contain Japanese characters. Specifies the page width in columns. The default value is 132. OPERANDS
Specifies the file to record accounting information. DESCRIPTION
The ln03jaof filter is used to filter text data for the LN03S-JA printer. The filter handles the device dependencies of the printer and performs accounting functions. At print job completion times, accounting records are written to the file specified by the af field in the /etc/printcap file. The ln03jaof filter can handle plain text files and files that have been preprocessed by nroff. Either kind of file can contain non-ASCII characters. The filter translates nroff control sequences for underlining, superscripting, and subscripting into the proper control sequences for the LN03S-JA printer. The ln03jaof filter can be the specified filter in both the of and the if fields in the /etc/printcap file. For a description of these fields, see printcap(4). The LN03S-JA printer can be configured to use the software on-demand loading (SoftODL) mechanism to print user-defined characters (UDCs). See i18n_printing(5) for a description of SoftODL. To enable SoftODL printing, set the ys field in /etc/printcap to 256. You can also set the default SoftODL database, style, and size by using the odldb and odlstyle options of the ya field. If you specify a value for the yt field, use fifo. For more information on these fields and associated options, refer to printcap(4). NOTES
The lpr command supports a number of options and associated arguments to enable localization features supported by various printers. The following can be used with the ln03jaof print filter: To specify the SoftODL database path To specify SoftODL font style and size For a complete description of the -A option and its arguments, refer to lpr(1). ERRORS
The lf field (default value is /dev/null) in the /etc/printcap file specifies the name of the error log. SEE ALSO
Commands: lpr(1), pr(1), lpd(8), pac(8) Files: printcap(4) Others: i18n_printing(5) ln03jaof(8)
All times are GMT -4. The time now is 12:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy