Sponsored Content
Top Forums Shell Programming and Scripting append a record at the end of a file Post 302236268 by jim mcnamara on Monday 15th of September 2008 07:15:17 AM
Old 09-15-2008
one way
Code:
rec="1234 last record"
echo "$rec" >> myfile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

echo, append to end of file

I need the line printed with echo to append to eof of to exactly line, am i able to do that? i mean echo "sysctl -w lalala=1" > to end of file /etc/sysctl.conf or to the 21st line, if the line exist, open new line and insert text there. Thx.maybe i'm in wrong topic but anyway... (2 Replies)
Discussion started by: hachik
2 Replies

2. Shell Programming and Scripting

to append few chars at the end of a file

hi i want to open a file at runtime append few chars at the end of each line all these i want to have done automatically how to do it (2 Replies)
Discussion started by: trichyselva
2 Replies

3. Shell Programming and Scripting

Append text at end of the first line in a file

Hi I need to append some text @ end of the first line in a file. like myfile.txt list = a,b,c list.a=some.. I give the arg "d" . now it append at end of first line list=a,b,c,d list.a=some... Please help me out this (7 Replies)
Discussion started by: catgovind
7 Replies

4. UNIX for Dummies Questions & Answers

How to append a semcolon to every record in a file?

Hi, If a file is like 123 456 894 568 234 and the desired o/p is "123" "456" "894" -- -- How can it be done? (2 Replies)
Discussion started by: er_ashu
2 Replies

5. 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

6. Shell Programming and Scripting

append a character at end of each line of a file

Hi, i want to append a character '|' at end of each line of a file abc.txt. for example if the file abc.txt conatins: a|b|c 1|2|33 w|2|11 i want result file xyz.txt a|b|c| 1|2|33| w|2|11| I know this is simple but sumhow i am not able to reach end of line. its urgent, thanks for... (4 Replies)
Discussion started by: muaz
4 Replies

7. 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

8. Shell Programming and Scripting

append | to the end of each data in a file

I have a file which has data in the below format: 7810902|6783014102| || |0| |0| |0| |0|||||T|04/13/2006||9423|7421||100|2006-04-13 16:50:28|||2006-04-13 16:50:28|n|51|-1||214 1089929|||||NewSpCreateAction request successful. Activity ID = <826528>||||100|n|2006-04-13 16:50:27|2006-04-13... (3 Replies)
Discussion started by: ankianand88
3 Replies

9. Shell Programming and Scripting

Replace string and append Indicator to end of record in Linux

Hi All, Could you please help me to achieve below solution. I have a FILE1.txt as below.TEXAS CALIFORNIA TEXAS DALLAS CALIFORNIA CALIFORNIA DALLAS DALLAS TEXAS TEXAS DALLAS NEW YORK NEW YORk FILE2.txt as below.TEXAS,TX DALLAS,DA Now I need to compare the string in FILE2.txt... (6 Replies)
Discussion started by: ureddy
6 Replies

10. Shell Programming and Scripting

Help with awk script to append seq num at end of record

Hi Unix forum. I have the following requirement to add a sequence value to each record in a file but only if it meets certain conditions. Field value in pos. 1 and 2 must be '0B' or 'OA' else leave as is. Sequence value must be preserved for each OB and OA pair. Data Before: 123 456... (5 Replies)
Discussion started by: pchang
5 Replies
TCATEST(3)							   Tokyo Cabinet							TCATEST(3)

NAME
tcamgr - the command line utility of the abstract database API DESCRIPTION
The command `tcamgr' is a utility for test and debugging of the abstract database API and its applications. `name' specifies the name of a database. `key' specifies the key of a record. `value' specifies the value of a record. `params' specifies the tuning parameters. `func' specifies the name of a function. `arg' specifies the arguments of the function. `dest' specifies the path of the destination file. tcamgr create name Create a database file. tcamgr inform name Print miscellaneous information to the standard output. tcamgr put [-sx] [-sep chr] [-dk|-dc|-dai|-dad] name key value Store a record. tcamgr out [-sx] [-sep chr] name key Remove a record. tcamgr get [-sx] [-sep chr] [-px] [-pz] name key Print the value of a record. tcamgr list [-sep chr] [-m num] [-pv] [-px] [-fm str] name Print keys of all records, separated by line feeds. tcamgr optimize name params Optimize a database file. tcamgr misc [-sx] [-sep chr] [-px] name func [arg...] Call a versatile function for miscellaneous operations. tcamgr map [-fm str] name dest Map records into another B+ tree database. tcamgr version Print the version information of Tokyo Cabinet. Options feature the following. -sx : the input data is evaluated as a hexadecimal data string. -sep chr : specify the separator of the input data. -dk : use the function `tcadbputkeep' instead of `tcadbput'. -dc : use the function `tcadbputcat' instead of `tcadbput'. -dai : use the function `tcadbaddint' instead of `tcadbput'. -dad : use the function `tcadbadddouble' instead of `tcadbput'. -px : the output data is converted into a hexadecimal data string. -pz : do not append line feed at the end of the output. -m num : specify the maximum number of the output. -pv : print values of records also. -fm str : specify the prefix of keys. This command returns 0 on success, another on failure. SEE ALSO
tcatest(1), tcamttest(1), tcadb(3), tokyocabinet(3) Man Page 2012-08-18 TCATEST(3)
All times are GMT -4. The time now is 06:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy