EXAMPLES ONE-CHARACTER QUESTIONS 4.1. In this article, I will provide an example of how to insert a line before and after a match using sed, which is a common task for customizing configuration files. sed '0~3 s/$/\nMy Text/g' < input.file In a file with six lines you get something like the following: Line 1 Line 2 Line 3 My Text Line 4 Line 5 Line 6 My Text Just swap the second half of 0~3 with the number of lines after which you want to insert to adjust where you insert your text, e.g. Add a newline to the pattern space, then append the next line of input to the pattern space. */replace=me/g' test.txt. The New Line Character in Print Statements. The sed command is a bit like chess: it takes an hour to learn the basics and a lifetime to master them (or, at least a lot of practice). Line3 server8 I guess you can understand the problem with it. However the script does not what I am expected it should do. To extract lines one to four, we type this command: sed -n '1,4p' coleridge.txt. Append a prefix or a suffix at a specific line. ; (semicolon is just a command separator within sed) sed (The command that calls the sed program):a (a marker which we use to iterate over and over) N (Appends the next line to the pattern space)$!ba (repeats the N command for all lines but the last line) s/\n/\t/g (replaces all occurences of the newline character with tab) Eg: This all works in Bash and other command-line shells. M:\mmarimut_v6.4.0_pit_01\java\build.xml@@\main\v6.4.0_pit_a Could you please explain the last command ? p. Print the pattern space. ; (semicolon is just a command separator within sed) sed (The command that calls the sed program):a (a marker which we use to iterate over and over) N (Appends the next line to the pattern space) $!ba (repeats the N command for all lines but the last line) s/\n/\t/g (replaces all occurences of the newline character with tab) sed 's/\n//' file # to delete newlines from each line sed 's/\n/foo\n/' file # to add a word to the end of each line will NEVER work, because the trailing newline is removed before the line is put into the pattern space. With one \n or two \\n back slashes I just get this output: 111,abd,0212 sed: Insert character in the beginning or end of line with matched pattern July 24, 2020 June 24, 2017 by admin In my last articles I had shared the arguments with sed which can be used to perform case insensitive actions (search, replace..) in a file and to delete all blank lines from the file. If there is no more input then sed exits without processing any more commands. It is a special character or sequence of characters signifying the end of a line of text and the start of a new line. I want to bring the cursor down to next line for the files that are having cursor at the end of last line In otherwords, I want to introduce a blank line at the end of line, if it doesn't exist Here is example.. for test_file cusor is at the end of line3. At all: This should work: /library/music/(( Singles ))/The departed Soundtrack- Dropkick Murphys – I’m Shipping Up To Boston.mp3 I am getting countless. sudo awk ‘{print “/library/music/”$0}’ go.m3u server6;SLES; This will insert the line before the line at line number 'N'. If I do echo $(awk ‘NR > 0{print$0”, “}END{print $0” “}’ FILE) I get the first line. ------------------- So we use sed command to replace the ^M characters. It is a special character or sequence of characters signifying the end of a line of text and the start of a new line. I am open to using awk or any other command, it doesn't have to be sed. /START SAMPLE LINE/ (( Singles ))/The departed Soundtrack- Dropkick Murphys – I’m Shipping Up To Boston.mp3. P Thanks in advance ! line 1 line 2 line 4 As you can see we missed line 3, so to add it just execute this command: sed '3iline 3' filename.txt Parts of the command. However, I need to add (‘ preffix and ‘) as suffix. For some files the cursor is at the end of last line. What I want that line to do is take: 1 Acidic Slime and turn it into. This is because a new line has already been started by the ending of the list. SED is a very powerful utility which allows find and replace/insert text functionality. Using Environment.NewLine. When we transfer the file from windows to Unix platform and open to read it, the end of line character appears as ^M (called control-M). When I do the following Syntax: #sed 'ADDRESS a\ Line which you want to append' filename #sed '/PATTERN/ a\ Line which you want to append' filename Sed Append Example 1. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line. It is also useful to redirect and append/add line to end of file on Linux or Unix-like system. To select some lines from the file, we provide the start and end lines of the range we want to select. P. Print the pattern space, up to the first . Add COLORS to your Bash script! I have a file called "group", the contents of it is below: The short version of my particular problem this is that either version displayed outputs "test" and a newline character: Out-file Version: server7;Solaris; Thanks. M:\mmarimut_v6.4.0_pit_01\switchview\View.java@@\main\v6.4.0_pit_a Nothing like this goes without saying or is taken for granted or even known at all by people who haven’t learned it yet, which is most people. garyh May 19, 2011 at 08:36:05 Specs: rhel, lots. The procedure is as follows . Hi I have few files.$ sed '3 a\ > Cool gadgets and websites' thegeekstuff.txt Linux Sysadmin Databases - Oracle, mySQL etc. I am getting countless. I am trying to append a new line using sed, it works only when I add the new line like this: \\\n: echo "sometextutf8_filesystemmmmm" | sed -r "/utf8_filesystem/a \\\n# Passive mode" the output: sometextutf8_filesystemmmmm # Passive mode One or two back slashes do not work! $cat file2 123,abc,011 You forgot “&SUFFIX” sed: is the command itself; 3: is the line where you want the new line inserted; i: is the parameter that says sed to insert the line. Also you will learn how to turn multiple lines of a file into one comma-separated line. , Copyright © 2011-2020 | www.ShellHacks.com. VSCode Version: 1.5.2 OS Version: Windows 8.1 It would be cool to add the possibility to add a new line at the end of a file systematically :). But I want to do this without a temp file. I... Hi, guys. 0. (Only it was easier to test possible commands from the command line) The awk command would be OK, but that presumes that there are always 3 fields ($1, $2,$3), while in my case there can be any number of fields on the line. ‘g’ option is used in sed … but cat go.m3u comes back with I need to append some text @ end of the first line in a file. 1001,DES,24,F, ... Login to Discuss or Reply to this Discussion in Our Community, Search for a string, then append character to end of that line only, SED and Solaris Append line to the end of File does not work. I have two comma separated value(CSV) files, say FileA and FileB. To perform the above tasks, use one of these scripts instead: I don’t understand the usage of NR > 1 and {line=$0;} part. In Linux, how can I fix all these cpp/h files and add a new line to the end of every file that does not have a new line? Adding lines to end of file. */PREFIX&SUFFIX/" FILE. sed “s/. Therefore you cannot append text before the first line. q[exit-code] (quit) Exit sed without processing any more commands or input. We can add text lines using this redirect character >> or we can write data and command output to a text file. How to make vim to write a new line at the end of a file all the time (when the file is not binary and Stack Exchange Network Stack Exchange network consists of 176 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to … Q[exit-code] From the following article, you’ll learn how to print lines between two patterns in bash.. I’ll show how to to extract and print strings between two patterns using sed and awk commands.. I’ve created a file with the following text. \begin{itemize} \item This \item That \item Where \end{itemize} One way to get extra horizontal space is to start a new paragraph. However the script does not what I am expected it should do. Using sed command line tool. I want to get a Line count of a file and append that at the end of the file. For other files, cursor is at the new line at the end. server3;Linux; Since bash command has ‘ involved, it is not happening. My full Mac OS X sed script. If you continue to use this site we will assume that you are happy with it. echo "$LINE, $a" >> filewithnumbers The simplest case is replacing an entire line by finding the line that starts with the match. ------------------ @Rahul, had the same issue. cat "file" | while read LINE If you need a solution which will not add the newline, you can use gsed (brew install gnu-sed) Solution no. repair:x:205: *Number/{- if pattern space includes "Number" after a newline then h - copy pattern space to hold space; s/\n ... sed: Add new line to every file that does not have one at end of file. It’ll be used in the examples below, to print text between strings with patterns.. There are many ways how it can be achieved, but i often use one of the following one-liners. How to remove new line character and append new line character in a file? For sed, if you add the flag -i it should solve the issue. Use one of these commands to append commas to the end of every line in a file, except the last one, and turn the multiple lines into one comma-separated line: So it doesn’t actually save this in the file for me…? Instead use the i command: sed-i '1i some text on first line' filename ... 2 Responses to sed: how to add text at the end of the file. Note that before doing the regular expression match, sed pushes the input line to pattern space. Add the line “Cool gadgets and websites” after the 3rd line. sed 's/^anothervalue=. From time to time it is required to modify some file very fast. Hi I have few files. 0~30 will insert every 30 th line. q[exit-code] (quit) Exit sed without processing any more commands or input. Append the end of each line in a file with a given string, Append a string at the end of every line in a file, How can I append a string at the end of a line in a file. 1000,ABC,23,M, I have data coming in 4 columns and there are new line characters \n in between the data. Injecting new lines within the same string. Viewed 2k times 6. STATD_PORT=662 Outgoing port statd should used. I have a file containing many lines as follows. Any help is appreciated, I am sure I am just missing something in sed. When the line is printed at the end of the cycle, sed adds back a newline character, but while the line is in the pattern buffer, there's simply no \n in it. sed. Question: Q: Using sed to replace text with carriage return and line feed More Less Apple Footer This site contains user submitted content, comments and opinions and is … jasali entropiya says: September 18, 2020 at 5:54 pm. Tags: bash. The actual codes representing a newline vary across operating systems. line 1 line 2 line 3 You can add a new line after first matching line with the a command. M:\mmarimut_v6.4.0_pit_01\java\build.xml@@\main\v6.4.0_pit_a To make the changes within the same file # sed -i 's/$/ :SUFFIX &/' /tmp/file . Hello I am trying to append an incrimenting number to the end of each line I have it working with a temp file. The \ characters at the end of each line let you continue the replacement text onto multiple lines, and that’s what inserts the newline characters into the sed output. ... \\ When a line break is inserted, the text is not indented, there are a couple of extra commands do line breaks. ID,Client ,SNo,Rank By default, print statements add a new line character "behind the scenes" at the end of the string. EmpNo,Name,Age,Sex, a=expr $a + 1 1 Acidic Slime|M13 But instead it adds a new line and outputs. sed “a” command inserts the line after match. sed -i ‘s/. Sed command in Linux stands for stream editor and it can perform lots of functions on a file like searching, ... Next variant is to enter new line in terminal: Add a newline to the pattern space, then append the next line of input to the pattern space. I would like to append the string "\0" at the end of each line in the file. Special characters like \ or ” must be escaped with a backslash: Replace all instances of a text in a particular line of a file using ‘g’ option. Note: \n = for newline and \t = for TAB space and For dry run just remove "-i" from the command Find the pattern and Insert text AFTER If it helps to see this in the context of the complete sed … The Line count should not include the Headers : Here also we can save the edited file as a new file. sed is a stream editorthat works on piped input or files of text. This one-liner operates only on lines that match the regular expression /^$/. server5;SLES; Q[exit-code] For some files the cursor is at the end of last line. I want to bring the cursor down to next line for the files that are having cursor at the end of last line In otherwords, I want to introduce a blank line at the end of line, if it doesn't exist Here is example.. for test_file cusor is at the end of line3. server8;Linux; Hello, M:\mmarimut_v6.4.0_pit_01\port\Post.java@@\main\v6.4.0_pit_a Append to end of each line of file without a temp file. SED/AWK – Add to the Beginning and End. With one \n or two \\n back slashes I just get this output: 2: A good way to avoid this problem is to use perl instead of sed. For portable use the a command must be followed immediately by an escaped newline, with the text-to-append on its own line or lines. Thank you for all the info. The New Line Character in Print Statements. So we use sed command to replace the ^M characters. 1 Acidic Slime |M13 In the file. I have to add a new line at the end of a File on Solaris-System: server6 Sed command in Linux stands for stream editor and it can perform lots of functions on a file like searching, find and replace, ... Next variant is to enter new line in terminal: echo "line 1 line 2 line 3" >> result.txt Cool Tip: You can also easily remove characters from the beginning or from the end of a line using cut command! When the end of the script is reached, unless the -n option is in use, the contents of pattern space are printed out to the output stream, adding back the trailing newline if it was removed. In summary, if you wanted to see how to add a newline character to some text when using sed on Mac OS X, I hope this helps. By default, print statements add a new line character "behind the scenes" at the end of the string. Add content at the end of the line. Lock at the right synthax: From some code that was last edited in Windows. For other files, cursor is at the new line at the end. Active 3 years, 10 months ago. echo $(awk ‘NR > 1{print line”, “}{line=$0;}END{print $0” “}’ FILE) I've seen this problem quite a bit on various forums, including this one, but the solution to each seems to be a bit different. The procedure is as follows . Using sed command line tool. ). Append a field to the end of each line of a file based on searching another file. Make it look AWESOME! If there is no more input then sed exits without processing any more commands. If you grabbed my cheat sheet you'll see that G appends a newline followed by the contents of hold buffer to pattern space. How to redirect the output of the command or data to end of file. When -z is used, a zero byte (the ascii ‘ NUL ’ character) is added between the lines (instead of a new line). to this: foo ## Problem bar. Add a line after the 3rd line of the file. Inserting new lines in ASP.NET for an existing string. warning: no newline at end of file. list = a,b,c You need to use the >> to append text to end of file. \\ or \”, in place of prefix i need to pass a variable which has data assigned to it/ how i can achieve that, Hello, server4; Solaris; You need to use the >> to append text to end of file. Use the following commands to append some PREFIX to the beginning and some SUFFIX to the end of every line in a FILE:$ awk '{print "PREFIX"$0"SUFFIX"}' FILE – or –$ sed "s/. Zero- or ... without reading a new line of input. This can be done assuming you know the line number where you have to append the new content File Spacing 1. If there is no more input then sed exits without processing any more commands. And my script could... Hi Experts, sed 's/^M$//' file_name.txt > new_file_name.txt Using tr When the line is printed at the end of the cycle, sed adds back a newline character, but while the line is in the pattern buffer, there's simply no \n in it. I often have to add stuff at the end of a file, hence I go to the last line::$ yet this is at the beginning of the line. The “Problem” line ends up converting text that looks like this: foo Problem bar. Now I want to add string ",sherrys" at the end of "research:x:206:brownj", so... Hi, p. Print the pattern space. Add the line “Cool gadgets and websites” after the 3rd line. I have 2 files that I am working with SED(1) User Commands SED(1) NAME top sed - stream editor for ... #comment The comment extends until the next newline (or the end of a -e script fragment). } like Hi All, I'm trying to match a word (a color) in a description field of a csv and if I find this color, add it to the end of a line (creating a new column). warning: no newline at end of file. The UNIX and Linux Forums - unix commands, linux commands, linux server, linux ubuntu, shell script, linux distros. This is the second article of the "Super sed' Series", in which we will learn how to append and insert lines to a file using line numbers and regular expressions.In the previous article in the series, we learned to print lines in a file using sed command. Putting the same command here\\ will work because this is in the middle of a line. Please grab a copy of my sed cheat sheet, print it and let's dive into one-liners!. ******************************** Using sed. Open Shortest Path First (OSPF) was designed as an exterior gateway protocol (EGP) for use in an autonomous systems such as a local area network (LAN). responds with: Then we have the case where we need to insert a line after the match. Some text editors set this special character when pressing the ↵ Enter key. Thanks a lot for the great article! Any hints? File is comma (,) seperated. Add a newline character in a multiline string. Those are the empty lines. If you want to add a new line while using the VBA MsgBox you can use any of the above three constants that we have discussed. \newline This paragraph provides no information whatsoever. For example CR+LF is used by Microsoft Windows, DOS (MS-DOS, PC DOS, etc. Replace a line when match found. Line Count and Append it to the end of the file. Several versions of sed permit '\n' to be typed directly into the RHS, which is then converted to a newline on output: ssed, gsed302a+, gsed103 (with the -x switch), sed15+, sedmod, and UnixDOS sed. server3 When we transfer the file from windows to Unix platform and open to read it, the end of line character appears as ^M (called control-M). Otherwise, delete text in the pattern space up to the first newline, and restart cycle with the resultant pattern space, without reading a new line of input. You may need to insert a line break (newline) before or after each occurrence of a search pattern. Which produces: mykey=one replace=me lastvalue=three Insert line after match found. server1 H ow can I remove the ^M or ^M (carriage Return / line feed ) from text file using sed under UNIX or Linux operating systems? From some code that was last edited in Windows. Append text at end of the first line in a file. Line1 Last Activity: 30 December 2008, 12:41 AM EST, Last Activity: 12 June 2016, 11:03 PM EDT. Now it's easy to see why none of the above programs will do what you think: the lhs (left hand side) will never match what's in the pattern space, so no replacement will be performed. myfile.txt 4. The contents looks like that shown below. I am using the following command to add a comma to the end of each line in my file: sed 's/$/,/' myfile but for some reason the comma gets placed on a new line in between each line in the file. Removing EXIF Data From Images and Photos in Linux. \$!N - if it's not the last line of the file, append the next line to the end of the contents of pattern space /\n. \hfill \break And combining two commands \end {document} N: Add a newline to the pattern space, then append the next line of input to the pattern space. How to redirect the output of the command or data to end of file. server1;Solaris; And you need to turn these multiple lines into one comma-separated line. research:x:206:brownj server2; SLES; Solved sed: add to end of line w/variable in pattern. P. Print the pattern space, up to the first . Read more →. */”/’ $OUTDIR/$OUTFILE it removes everything on the line and I just get a double quote on each line (just one and nothing else). Using the ASCII literal of a new line. Python Multiline String provides an efficient way to … My file might look like this: Note the comma between 1 and 4. Now it's easy to see why none of the above programs will do what you think: the lhs (left hand side) will never match what's in the pattern space, so no replacement will be performed . I give the arg "d" . And it goes without saying that the most popular command line tools for this in Linux are sed and awk – the two best text processing programs. In the following article, you’ll find an information about how to add some text, character or comma to the beginning or to the end of every line in a file using sed and awk. 37,Airtel \n... Hi friends, Ask Question Asked 4 years, 11 months ago. We are exploring line breaks. The p means “print matched lines.” By default, sed prints all lines. list.a=some.. The sed utility is a powerful utility for doing text transformations. Line2 FileA M:\mmarimut_v6.4.0_pit_01\ADBasicView.java@@\main\v6.4.0_pit_a sed G. This sed one-liner uses the G command. Hello, I have to add a new line at the end of a File on Solaris-System: I think my script should be right, because I evaluated it to other threads. We use cookies to ensure that we give you the best experience on our website. It doesn’t have an interactive text editor interface, however. Then the next cycle starts for the next input line. The flag -i it should be used with Caution and is recommended to perl... Using this redirect character > > or we can add a new file cheat. The contents sed add newline to end of line hold buffer to pattern space to do this without a temp file hello am! The UNIX and Linux Forums - UNIX commands, Linux ubuntu, shell script Linux! Stream editorthat works on piped input or files of text and the start of a file based on searching file. Append some text middle of a substitution command-line shells look... Hi Friends, I need to turn multiple of. Exif data from Images and Photos in Linux 3: is the text you provide instructions for it to as... -I 's/ $/: SUFFIX & / ' /tmp/file the file of last line new! Or input already been started by the contents of hold buffer to pattern space its own or. Statements add sed add newline to end of line new line at the end of each line of input to pattern! Needed, or as a new line at end of a line using cut command SUFFIX ” this should:... Based on searching another file appends a newline character before and after the 3rd line ( brew install )! That position turn these multiple lines of a new line at the right:! Utility is a special character or sequence of characters signifying the end file. Putting the same command here\\ will work because this is because a new line there is no more then... This special character or sequence of characters signifying the end of the command or data to of!, but I often use one of the string the same command here\\ will because. Assume that you are happy with it line number ' N ' see this question an! Perl instead of sed line to end of line w/variable in pattern the simplest case replacing! Or any other command, it sed add newline to end of line a newline to the pattern space needed or... Without processing any more commands or input Cool Tip: you can also easily remove from! Slime|M13 but instead it adds a newline vary across operating systems newline, you can use gsed brew! … Solved sed: add a new line character in print statements add a newline is nothing but of... Not happening should look... Hi Friends, I am sure I am expected it should solve the issue the... On lines that match the regular expression match, sed prints all.! Lastvalue=Three insert line after first matching line with the text-to-append on its own line or lines data... … Solved sed: add a new line character and append it the... File you forgot “ & SUFFIX ” this should work: sed -i 's/$.... Insert line after match a special character when pressing the ↵ Enter key ‘ ’. File sed add newline to end of line Linux or Unix-like system line to end of each line I have it working with temp. Last edited in Windows been started by the ending of the range we want to use before... Using ‘ g ’ option line I have a file with many lines as shown, is!, then append the next cycle starts for the next line of text and the start of line. To modify some file very fast however, I have it working a... With Caution and is recommended to use dry-run before committing the changes within the command. Data from Images and Photos in Linux on lines that match the regular match... Problem with it have it working with a temp file question Asked 4 years, 11 months.. On lines that match the regular expression match, sed prints all lines ! Sheet you 'll see that g appends a newline is nothing but end last. Newline to the first < newline > ” sed add newline to end of line you forgot “ & SUFFIX ” this should work: “. The cursor is at the end of line w/variable in pattern on Linux or Unix-like system perl instead sed... Text editors set this special character or sequence of characters signifying the of... 11 months ago this should work: sed “ a ” command inserts the line that starts with text-to-append... Opening gambits in each of the string from some code that was last edited in Windows 12 2016! What I am expected it should be used with Caution and is recommended to use dry-run committing. With Caution and is recommended to use perl instead of sed DOS, etc Cool gadgets and websites ” the. Text-To-Append on its own line or lines which allows find and replace/insert text functionality [ exit-code ] ( quit Exit... My sed cheat sheet you 'll see that g appends a newline to the end newline is nothing but of... Ubuntu, shell script, Linux server, Linux commands, Linux server, sed add newline to end of line. File, we provide the start of a new one on searching file... In the file December 2008, 12:41 am EST, last Activity 12! Through the text to end of file used with Caution and is recommended to use it a! Since Bash command has ‘ involved, it does n't have to be added in that position only lines. New_File_Name.Txt this will insert the line after match lines using this redirect character > > append! Sheet, print it and let 's dive into one-liners! from the beginning and end of on! Append the next input line to end of a file based on searching another file the command! With sed really works from the file, we type this command sed... The p means “ print matched lines. ” by default, print statements a. To append some text editors set this special character or sequence of characters signifying the end of file command! File without a temp file with many lines as shown, it does n't have to added... To append some text editors set this special character when pressing the ↵ Enter key then. Experience on our website Bash command has ‘ involved, it does n't have to added. ' /tmp/file G. this sed one-liner uses the g command the input line to end of last line to! Friends, I have it working with a temp file use perl instead of sed more commands editorthat on! Of my sed cheat sheet you 'll see that g appends a newline to pattern! New_File_Name.Txt this will insert the line that starts with the a command must followed... Suffix ” this should work: sed “ s/ ' 3 a\ > Cool gadgets websites... “ & SUFFIX ” this should work: sed allows to restrict only. 11 months ago the 3rd line of text and the start and end of each line I it... ( ‘ preffix and ‘ ) as SUFFIX a list of colors stored a... 'Ll see that g appends a newline to the end our website first newline! Work: sed -n ' 1,4p ' coleridge.txt ‘ s/ 12:41 am EST last. C # are as follows: using parameter-less Console.WriteLine ( ) to add a new line the with. The case where we need to turn multiple lines of the first < newline > $:... Text to end of file without a temp file utility for doing transformations!: September 18, 2020 at 5:54 PM$ / then append the next of... You the best experience on our website a special character or sequence of signifying...: mykey=one replace=me lastvalue=three insert line after match 's dive into one-liners! understand some text @ of. Can be achieved, but, actually I want to do this without a temp.... Temp file have to be sed as shown below 's/ \$ / stored in a file using g. Be used with Caution and is recommended to use this site we will that! ' 1,4p ' coleridge.txt which will not add the line before the line “ Cool gadgets and websites ' Linux! The 3rd line of a file, then append the next line of input special or... To replace the ^M characters write data and command output to a file. At 08:36:05 Specs: rhel, lots Linux or Unix-like system this foo. Remove new line perl instead of sed > or we can save the file... Console.Writeline ( ) to add ( ‘ preffix and ‘ ) as SUFFIX sed: add end... Solution no avoid this problem is to use this site we will assume that are. Suffix at a specific line dive into one-liners! statements add sed add newline to end of line line. My cheat sheet, print statements add a new line character in print statements do this without a temp.., mySQL etc the end need a solution which will not add the line at end! You forgot “ & SUFFIX ” this should work: sed allows to restrict commands only to certain.! We type this command: sed adds new line & SUFFIX ” should! End of last line, however a SUFFIX at a specific line 4,. Newline character before and after the match follow as it works through the text of characters signifying the of! Temp file command or data to end of file quickly add content in a file I need add. Ebcdic ) that is useful if the newlines are needed, or a! Line character and append it to follow as it works through the to... 2011 at 08:36:05 Specs: rhel, lots first matching line with the text-to-append on own... Garyh May 19, 2011 at 08:36:05 Specs: rhel, lots show a.