Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Appending at the beginning of the file. Post 302412986 by jim mcnamara on Wednesday 14th of April 2010 07:16:25 AM
Old 04-14-2010
append means add to the end of something. Assume you have a file, oldfile, that you want to prepend data to. Generate the data, put it in a tmp file, then cat the tmpfile and the oldfile into a newfile:
Code:
[command to create some more data] > tmp
cat tmp oldfile > new_oldfile

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cat a file from end to beginning

Is there an option, for cat, head, tail, or is there any way, to display a file from last line to first? For example, my file looks like this: aaaa bbbb cccc eeee and I would like to print or display it like this: eeee cccc bbbb aaaa thanks (5 Replies)
Discussion started by: jpprial
5 Replies

2. Shell Programming and Scripting

Add text to beginning of file

Hi I need to add text to the beginning of a file in the same way that cat will put file contents at the end of a file. I want to do this with many files eg cat newtext >> /usr/home/*/*.bat Any ideas? (2 Replies)
Discussion started by: donkey
2 Replies

3. Shell Programming and Scripting

Append (cat) to beginning of file ?

Hi, Fairly new to unix scripting, hoping to get some help. using AIX v5 Basically I have 3 files 1). Header record 2). many detail record 3). Trailer record My desired result is 1 file which contains Heaeder, Detail, Trailer Currenty I am using a series of: ... (8 Replies)
Discussion started by: CBZ
8 Replies

4. UNIX for Dummies Questions & Answers

Append to beginning of a file

Hi, I have a file x which is being upated continuously. I want to add file y in the file x but at the beginning of file x. file x file y After commands file x eeee aaaa aaaa gggg bbbb bbbb hhhh... (2 Replies)
Discussion started by: baanprog
2 Replies

5. UNIX for Dummies Questions & Answers

Adding one string at the beginning of each line in a file

Hi, I have file a.txt as below. I want to add one string root beginning of each line. Sample file a.txt aaa bbb ccc Sample output Root aaa Root bbb Root ccc Can any one help me on this? (6 Replies)
Discussion started by: siba.s.nayak
6 Replies

6. Linux

Add file's date at beginning of every line in file

How would I do that? /Rutger (6 Replies)
Discussion started by: rutgerblom
6 Replies

7. UNIX for Dummies Questions & Answers

rename file by adding a name in beginning

about 200 files with names as 11_0.pdb 11_60.pdb 12_12.pdb 14_180.pdb are there in my library...I need to rename all of them by addinf File in front of them as: File11_0.pdb File11_60.pdb File12_12.pdb File14_180.pdb I checked many threads but it seems i get even more confused..i... (1 Reply)
Discussion started by: kanikasharma
1 Replies

8. Shell Programming and Scripting

Append file name to the beginning of each line

I want to append file names at the beginning of a line for each row file content abc.txt.gz 123|654|987 bcd.txt.gz 876|trf|kjh I want a single output file with below format abc.txt.gz|123|654|987 bcd.txt.gz|876|trf|kjh This one is working but only with unzip files,need to have... (3 Replies)
Discussion started by: rakesh5300
3 Replies

9. UNIX for Dummies Questions & Answers

[Solved] Appending beginning of filename to end

Hi Guys, I have serveral directories like this: (2013) blablabla(blabla) - blabla (blabla) or (1997) blablabla(blabla) - blabla (blabla) and have to rename them to something like that: blablabla(blabla) - blabla (blabla) (2013) and blablabla(blabla) - blabla (blabla) (1997) Easy... (2 Replies)
Discussion started by: Nateshift
2 Replies

10. Shell Programming and Scripting

How to add one line in the beginning of the file?

Hi gurus, I need add one new line in the begining of current file. current file abc cde add xyz output file newline abc cde add xyz (6 Replies)
Discussion started by: ken6503
6 Replies
exexedat(3alleg4)						  Allegro manual						 exexedat(3alleg4)

NAME
exexedat - Appending datafiles onto your executable. Allegro game programming library. SYNOPSIS
#include <allegro.h> Example exexedat DESCRIPTION
This program demonstrates how to access the contents of an Allegro datafile (created by the grabber utility) linked to the executable by the exedat tool. It is basically the exdata example with minor modifications. You may ask: how do you compile, append and exec your program? Answer: like this... 1) Compile your program like normal. Use the magic filenames with '#' to load your data where needed. 2) Once you compressed your program, run "exedat foo.exe data.dat" 3) Finally run your program. Note that appending data to the end of binaries may not be portable across all platforms supported by Allegro. SEE ALSO
DATAFILE(3alleg4), END_OF_MAIN(3alleg4), allegro_error(3alleg4), allegro_init(3alleg4), allegro_message(3alleg4), blit(3alleg4), font(3alleg4), install_keyboard(3alleg4), line(3alleg4), load_datafile(3alleg4), makecol(3alleg4), readkey(3alleg4), screen(3alleg4), set_color_conversion(3alleg4), set_gfx_mode(3alleg4), set_palette(3alleg4), textout_ex(3alleg4), unload_datafile(3alleg4) Allegro version 4.4.2 exexedat(3alleg4)
All times are GMT -4. The time now is 02:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy