Sponsored Content
Top Forums Shell Programming and Scripting Append this string to end of each line Post 302817619 by omega3 on Thursday 6th of June 2013 07:20:41 AM
Old 06-06-2013
Append this string to end of each line

Platform: Solaris 10

I have a file like below

Code:
$ cat languages.txt
Spanish
Norwegian
English
Persian
German
Portugese
Chinese
Korean
Hindi
Malayalam
Bengali
Italian
Greek
Arabic

I want to append the string " is a great language" at end of each line in this file.

Expected output:

Code:
Spanish is a great language
Norwegian is a great language
English is a great language
Persian is a great language
German is a great language
Portugese is a great language
Chinese is a great language
Korean is a great language
Hindi is a great language
Malayalam is a great language
Bengali is a great language
Italian is a great language
Greek is a great language
Arabic is a great languages

How can I do this?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

HOWTO Append String to End of Line

I have a comma delimited text file and need to appened ",000000" to the end of every line. For example: Before: "D700000","2006" ,"5000","Open Year" ,"Conversion" ,"Wk64","Productive Payroll $" ,1103.45 After: "D700000","2006" ,"5000","Open Year" ,"Conversion" ,"Wk64","Productive Payroll... (3 Replies)
Discussion started by: bggibson
3 Replies

2. Shell Programming and Scripting

How can I append a string at the end of a line in a file

Hi, guys. I have one question: I have a file called "group", the contents of it is below: ******************************** ... test:x:203: sales:x:204: repair:x:205: research:x:206:brownj ... *********** Now I want to add string ",sherrys" at the end of "research:x:206:brownj", so... (5 Replies)
Discussion started by: daikeyang
5 Replies

3. Shell Programming and Scripting

How do I append a ^M to the end of each 129 character string

Hello all, I have a stumper of a problem. I am trying to append a ^M or "newline" to the end of each 129 character string in a huge file in unix. Each string starts with A00. I am trying to get the file to go from... A00vswjdv1 Test Junk Junk A00vswjdv2 Test Junk Junk ... (6 Replies)
Discussion started by: Captain
6 Replies

4. Shell Programming and Scripting

Append a string at the end of every line in a file

Hi Friends, I have a file with many lines as shown below. /START SAMPLE LINE/ M:\mmarimut_v6.4.0_pit_01\java\build.xml@@\main\v6.4.0_pit_a M:\mmarimut_v6.4.0_pit_01\port\Post.java@@\main\v6.4.0_pit_a M:\mmarimut_v6.4.0_pit_01\switchview\View.java@@\main\v6.4.0_pit_a /END SAMPLE LINE/ I... (1 Reply)
Discussion started by: nmattam
1 Replies

5. Shell Programming and Scripting

Append the end of each line in a file with a given string

Hi friends, I have a file containing many lines as follows. M:\mmarimut_v6.4.0_pit_01\java\build.xml@@\main\v6.4.0_pit_a M:\mmarimut_v6.4.0_pit_01\ADBasicView.java@@\main\v6.4.0_pit_a I would like to append the string "\0" at the end of each line in the file. The output should look... (10 Replies)
Discussion started by: nmattam
10 Replies

6. Shell Programming and Scripting

Append char to the end of string from Nth column

I'm sure this is easy to do but I can't find a one line command with awk or sed to append a char to the end of the string from Nth column. Any sugestion please? Thanks (2 Replies)
Discussion started by: cabrao
2 Replies

7. Shell Programming and Scripting

find a certain line and append text to the end of the line

After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh. Now I've gotten the sed... (2 Replies)
Discussion started by: peachclift
2 Replies

8. Shell Programming and Scripting

Search for a string, then append character to end of that line only

I have 2 files that I am working with $ cat file1 server1 server3 server5 server6 server8 $ cat file2 server1;Solaris; server2; SLES; server3;Linux; server4; Solaris; server5;SLES; server6;SLES; server7;Solaris; server8;Linux; (1 Reply)
Discussion started by: snoman1
1 Replies

9. Shell Programming and Scripting

sed - Find a String and append a text end of the Line

Hi, I have a File, which have multiple rows. Like below 123456 Test1 FNAME JRW#$% PB MO Approver XXXXXX. YYYY 123457 Test2 FNAME JRW#$% PB MO Super XXXXXX. YYYY 123458 Test3 FNAME JRW#$% PB MO Approver XXXXXX. YYYY I want to search a line which contains PB MO Approver and append... (2 Replies)
Discussion started by: java2006
2 Replies

10. UNIX for Advanced & Expert Users

Help in adding a string at the end of each line and append files vertically

hi, i need a help in the script , need to append a string at the end of each line of a files , and append the files into a single file vertically. eg file1 has the following columns abc,def,aaa aaa,aa,aaa files 2 has the following rows and columns abc,def,aaa aaa,aa,aaa i... (3 Replies)
Discussion started by: senkerth
3 Replies
Mail::SpamAssassin::Plugin::TextCat(3)			User Contributed Perl Documentation		    Mail::SpamAssassin::Plugin::TextCat(3)

NAME
Mail::SpamAssassin::Plugin::TextCat - TextCat language guesser SYNOPSIS
loadplugin Mail::SpamAssassin::Plugin::TextCat DESCRIPTION
This plugin will try to guess the language used in the message text. You can then specify which languages are considered okay for incoming mail and if the guessed language is not okay, "UNWANTED_LANGUAGE_BODY" is triggered It will always add the results to a "X-Language" name-value pair in the message metadata data structure. This may be useful as Bayes tokens. The results can also be added to marked-up messages using "add_header", with the _LANGUAGES_ tag. See Mail::SpamAssassin::Conf for details. Note: the language cannot always be recognized with sufficient confidence. In that case, "UNWANTED_LANGUAGE_BODY" will not trigger. USER OPTIONS
ok_languages xx [ yy zz ... ] (default: all) This option is used to specify which languages are considered okay for incoming mail. SpamAssassin will try to detect the language used in the message text. Note that the language cannot always be recognized with sufficient confidence. In that case, no points will be assigned. The rule "UNWANTED_LANGUAGE_BODY" is triggered based on how this is set. In your configuration, you must use the two or three letter language specifier in lowercase, not the English name for the language. You may also specify "all" if a desired language is not listed, or if you want to allow any language. The default setting is "all". Examples: ok_languages all (allow all languages) ok_languages en (only allow English) ok_languages en ja zh (allow English, Japanese, and Chinese) Note: if there are multiple ok_languages lines, only the last one is used. Select the languages to allow from the list below: af - Afrikaans am - Amharic ar - Arabic be - Byelorussian bg - Bulgarian bs - Bosnian ca - Catalan cs - Czech cy - Welsh da - Danish de - German el - Greek en - English eo - Esperanto es - Spanish et - Estonian eu - Basque fa - Persian fi - Finnish fr - French fy - Frisian ga - Irish Gaelic gd - Scottish Gaelic he - Hebrew hi - Hindi hr - Croatian hu - Hungarian hy - Armenian id - Indonesian is - Icelandic it - Italian ja - Japanese ka - Georgian ko - Korean la - Latin lt - Lithuanian lv - Latvian mr - Marathi ms - Malay ne - Nepali nl - Dutch no - Norwegian pl - Polish pt - Portuguese qu - Quechua rm - Rhaeto-Romance ro - Romanian ru - Russian sa - Sanskrit sco - Scots sk - Slovak sl - Slovenian sq - Albanian sr - Serbian sv - Swedish sw - Swahili ta - Tamil th - Thai tl - Tagalog tr - Turkish uk - Ukrainian vi - Vietnamese yi - Yiddish zh - Chinese (both Traditional and Simplified) zh.big5 - Chinese (Traditional only) zh.gb2312 - Chinese (Simplified only) inactive_languages xx [ yy zz ... ] (default: see below) This option is used to specify which languages will not be considered when trying to guess the language. For performance reasons, supported languages that have fewer than about 5 million speakers are disabled by default. Note that listing a language in "ok_languages" automatically enables it for that user. The default setting is: bs cy eo et eu fy ga gd is la lt lv rm sa sco sl yi That list is Bosnian, Welsh, Esperanto, Estonian, Basque, Frisian, Irish Gaelic, Scottish Gaelic, Icelandic, Latin, Lithuanian, Latvian, Rhaeto-Romance, Sanskrit, Scots, Slovenian, and Yiddish. textcat_max_languages N (default: 5) The maximum number of languages before the classification is considered unknown. textcat_optimal_ngrams N (default: 0) If the number of ngrams is lower than this number then they will be removed. This can be used to speed up the program for longer inputs. For shorter inputs, this should be set to 0. textcat_max_ngrams N (default: 400) The maximum number of ngrams that should be compared with each of the languages models (note that each of those models is used completely). textcat_acceptable_score N (default: 1.05) Include any language that scores at least "textcat_acceptable_score" in the returned list of languages perl v5.12.1 2010-03-16 Mail::SpamAssassin::Plugin::TextCat(3)
All times are GMT -4. The time now is 12:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy