Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Adding a line feed to each line Post 302458079 by bartus11 on Wednesday 29th of September 2010 02:40:46 PM
Old 09-29-2010
Code:
awk '{print $0"\x0a"}' file > outfile

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

file feed one line per argument

What tools can I use to accomplish this? I'm writing a shell script to analyze an inittab file. Here's a sample file: init:3:initdefault: ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1 tape::sysinit:/sbin/mtinit > /dev/console 2>&1 muxi::sysinit:/sbin/dasetup </dev/console >/dev/console... (10 Replies)
Discussion started by: jpprial
10 Replies

2. Shell Programming and Scripting

replace last form feed with line feed

Hi I have a file with lots of line feeds and form feeds (page break). Need to replace last occurrence of form feed (created by - echo "\f" ) in the file with line feed. Please advise how can i achieve this. TIA Prvn (5 Replies)
Discussion started by: prvnrk
5 Replies

3. Shell Programming and Scripting

line feed printing issue

I am have an issue with the carrige or line feed chars showing up on info converted to a pdf file from a Orcale tool. Any direction would be appericated. ex. John doe 12435 1 232344 1 Jane doe 12435 1 424343 1 when should be like this John doe... (1 Reply)
Discussion started by: sherrod6970
1 Replies

4. Shell Programming and Scripting

Get the 1st 99 characters and add new line feed at the end of the line

I have a file with varying record length in it. I need to reformat this file so that each line will have a length of 100 characters (99 characters + the line feed). AU * A01 EXPENSE 6990370000 CWF SUBC TRAVEL & MISC MY * A02 RESALE 6990788000 Y... (3 Replies)
Discussion started by: udelalv
3 Replies

5. Shell Programming and Scripting

Fill the empty line by adding line before blank line

FIle A "A" 2 aa 34 3 ac 5 cd "B" 3 hu 67 4 fg 5 gy output shud be A"" 2 aa 34 "A" 3 ac 34 "A" 5 cd 34 "B" 3 hu 67 "B" 4 fg 67 "B" 5 gy 67 (6 Replies)
Discussion started by: cdfd123
6 Replies

6. Shell Programming and Scripting

adding characters end of line where line begins with..

Hi all, using VI, can anyone tell me how to add some characters onto the end of a line where the line begins with certain charactars eg a,b,c,......., r,s,t,........, a,b,c,......., all lines in the above example starting with a,b,c, I want to add an x at the end of the line so the... (6 Replies)
Discussion started by: satnamx
6 Replies

7. Shell Programming and Scripting

Adding tab/new line at the end of each line of a file

Hello Everyone, I need a help from experts of this community regarding one of the issue that I am facing with shell scripting. My requirement is to append char's at the end of each line of a file. The char that will be appended is variable and will be passed through command line. The... (20 Replies)
Discussion started by: Sourav Das
20 Replies

8. Shell Programming and Scripting

Want to remove a line feed depending on number of tabs in a line

Hi! I have been struggling with a large file that has stray end of line characters. I am working on a Mac (Lion). I mention this only because I have been mucking around with fixing my problem using sed, and I have learned far more than I wanted to know about Unix and Mac eol characters. I... (1 Reply)
Discussion started by: user999991
1 Replies

9. Shell Programming and Scripting

Adding line in a file using info from previous line

I have a shell script that looks something like the following: mysql -uroot db1 < db1.sql mysql -uroot db2 < db2.sql mysql -uroot db3 < db3.sql mysql -uroot db4 < db4.sql .... different db names in more than 160 lines. I want to run this script with nohup and have a status later. So,... (6 Replies)
Discussion started by: MKH
6 Replies

10. Shell Programming and Scripting

Getting an unexpected newline in my while loop line-by-line feed

Hi, I'm trying to get a line returned as is from the below input.csv file in Bash in Linux, and somehow I get an unexpected newline in the middle of my input. Here's a sample line in input.csv $> more input.csv TEST_SYSTEM,DUMMY@GMAIL.COM|JULIA H|BROWN And here's a very basic while loop... (7 Replies)
Discussion started by: ChicagoBlues
7 Replies
smfi_addheader(3N)														smfi_addheader(3N)

NAME
smfi_addheader() - adds a header to the current sendmail message SYNOPSIS
PARAMETERS
includes the following arguments: ctx Specifies the opaque context structure. headerf Specifies the header name, which is a non-NULL, null- terminated string. headerv Specifies the header value to be added. headerv is a non-NULL, null-terminated string and can be an empty string. DESCRIPTION
adds a header to the current message. can be called only from the function. Notes does not change existing headers of a message. To change the current value of a header, use the routine. A filter that calls the must set the flag in the structure passed to the For the filter, the order in which filters are placed is important. Filters placed later in the sequence will observe the changes already done by the earlier filters. The name and the value of the header are not checked for standards compliance. However, each line of the header must be under 2048 charac- ters. If longer headers are needed, multi-line header must be used. To make a multi-line header, insert a line feed (ASCII 0x0a, or in C) followed by at least one whitespace character, such as, a space (ASCII 0x20) or tab (ASCII 0x09, or in C). The line feed must not be preceded by a carriage return (ASCII 0x0d); the MTA adds this automatically. It is the responsibility of the filter writer to ensure that standards are not violated. RETURN VALUE
returns due to the following reasons: o The headerf or headerv is o Adding headers in the current connection state is invalid. o Memory allocation failure. o Network error o is not set when the routine is called. returns on success. EXAMPLES
Following is an example to add a header: AUTHOR
was developed by the Sendmail Inc. SEE ALSO
smfi_chgheader(3N), smfi_insheader(3N), smfi_addrcpt(3N), smfi_delrcpt(3N), smfi_replacebody(3N). on smfi_addheader(3N)
All times are GMT -4. The time now is 01:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy