Sponsored Content
Top Forums Shell Programming and Scripting Add a word at the end of each line in a file Post 302162539 by ennstate on Tuesday 29th of January 2008 09:01:14 AM
Old 01-29-2008
Try,
Code:
 sed '$aEND-OF-FILE' yourFile >> newFile

Thanks
Nagarajan G
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

add data from command line to end of file

how can I add data from command line to end of file? (3 Replies)
Discussion started by: bryan
3 Replies

2. Shell Programming and Scripting

How to add filename to the end of each line in file

Hi, I'm reading data from comma separated files to DB. Now there is a need to have the name of the input file in each row of that file. How can I do this in unix script? Example: $cat file1 value11,value12, value,13 value21,value22, value,23 value31,value32, value,33 And the result... (2 Replies)
Discussion started by: tmikahan
2 Replies

3. UNIX for Dummies Questions & Answers

How to add new line character at the end of a file

hi all, i have this question: How to add new line character at the end of a file???? i need this because i am loading a file to sybase and i have problems with the last record thanks for your help (5 Replies)
Discussion started by: DebianJ
5 Replies

4. Shell Programming and Scripting

add character to the end of each line in file

hi all i have 32 lines in file. the length of each line is 82 , i want that in the end of each line , means in postion 83-84 to put two characters 0d(=\015), 0a(=\012) i want that the 0d will be in postion 83 and the 0a will be in postion 84 in each line of the file how shall i do it ? ... (7 Replies)
Discussion started by: naamas03
7 Replies

5. Shell Programming and Scripting

add character to every end-of line in file

Hi All I have a file which conatins record.the length of every records is 47. problem : in the end of record i don't have a "\015" character. i want to add this "\015" charcter in the end of every record. the file contains something like 700 records. i've tried with sed command - nothing. ... (8 Replies)
Discussion started by: naamas03
8 Replies

6. UNIX for Dummies Questions & Answers

Add blank line to end of file

Alright, so I was looking around a bit on the forum before posting and still don't really understand so I figured I'd post my own question. I am appending two files using cat file_1.txt >> file_2.txt The problem is that I need a blank line in between the two different text files and it does... (2 Replies)
Discussion started by: cgagnon
2 Replies

7. Shell Programming and Scripting

Add name at the end of line in one file

Hi Folks, I want to add one name at the end of one file. Below line i have to add end of line some name... Search_masterlogin=`grep -i $masterlogin passwd.master|awk -F: '{print $1}'` $ grep -i susan passwd.master |awk -F: '{print $1}' susan $ I want to insert one name called... (10 Replies)
Discussion started by: susindram
10 Replies

8. Shell Programming and Scripting

Add new line at beginning and end of a file

Hi, I have a specific requirement to add text at the beginning and end of a plain text file. I tried to use "sed" with '1i' and '$a' flags but these required two separate "sed" commands separated with "|". I am looking for some command/option to join these two in single command parameter. ... (6 Replies)
Discussion started by: bhupinder08
6 Replies

9. Shell Programming and Scripting

Add words in beginning , end after removing a word in a file

My file has the entries like below... /dev/sds /dev/sdak /dev/sdbc /dev/sdbu I want to make the file like below echo 1 > /sys/block/sds/device/rescan echo 1 > /sys/block/sdak/device/rescan echo 1 > /sys/block/sdbc/device/rescan echo 1 > /sys/block/sdbu/device/rescan (2 Replies)
Discussion started by: saravanapandi
2 Replies
DOCDIFF(1)						      General Commands Manual							DOCDIFF(1)

NAME
docdiff -- character/word-oriented diff SYNOPSIS
docdiff [options] file1 file2 DESCRIPTION
This manual page documents briefly the docdiff commands. This manual page was written for the Debian distribution because the original program does not have a manual page. Instead, it has docu- mentation in the HTML format; see below. docdiff is a program that compares two files and shows the difference. It can compare files word by word, char by char, or line by line. It has several output formats such as HTML/XHTML, tty, Manued, or user-defined markup. It supports several encodings and end-of-line characters, including ASCII, UTF-8, EUC-JP, Shift_JIS, CR, LF, and CRLF. OPTIONS
--resolution=RESOLUTION specify resolution (granularity) line|word|char (default is word) --line set resolution to line --word set resolution to word --char set resolution to char --encoding=ENCODING specify character encoding ASCII|EUC-JP|Shift_JIS|UTF-8|auto (default is auto) --ascii same as --encoding=ASCII --eucjp same as --encoding=EUC-JP --sjis same as --encoding=Shift_JIS --utf8 same as --encoding=UTF-8 --eol=EOL specify end-of-line character CR|LF|CRLF|auto (default is auto) --cr same as --eol=CR --lf same as --eol=LF --crlf same as --eol=CRLF --format=FORMAT specify output format tty|manued|html|wdiff|user (default is html; user tags have to be described in config file) --tty same as --format=tty --manued same as --format=manued --html same as --format=html --wdiff same as --format=wdiff --digest digest output, do not show all --cache use file cache --no-config-file do not read config files --verbose run verbosely --help show usage --version show version --license show license --author show author(s) SEE ALSO
/usr/share/doc/docdiff/readme.html. AUTHOR
This manual page was written by akira yamada akira@debian.org for the Debian system (but may be used by others). DOCDIFF(1)
All times are GMT -4. The time now is 07:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy