:confused:
I have a script that Cats a flat database file which contains 12 columns into sed. I want to add a 13th column which includes " ,2005-08-29 " * The date needs to be the current date.
This 13th column would be appended to the end of each line.
Does anyone have a clue... (5 Replies)
Hi,
I have tried many times to add the string into the first line of the file or the middle of the file but could not find the solution.
I first tried by
$echo "paki" >> file
This code only append paki string at the end of file "file" but how can i add this "paki" into the first line or... (5 Replies)
i am trying to append a 5 line SGML file(file1) with a 500,000 line SGML file (file2).
file1 is a template, so i wish to preserve.
i only want to add lines 5 to the end of file2.
i have:
cp file1 temp1
sed -n '5,$p' file2 >> temp1
when i check the tail of temp1, i consistantly find the... (3 Replies)
Hi,
I'm quite stuck with what I thought should've been simple but I just can't seem to do it. Firstly, I have the following done in bourne shell:
cat datafile | tr '' '' >> newfile
echo "$fullfilepath" >> newfile
i want to have the output of that echo put on the same line as the output... (4 Replies)
If I want to cat one file and have the output inserted into a specific place on another file, how is this done? I know how to append >> and to overwrite > but say I have a file with:
File1:
abc
def
ghi
jkl
And a File with:
File2:
mno
pqr
stu
vwx
And I want to place the... (5 Replies)
Hello Friends,
I'm trying to save process status of root user sorting by CPU usage. However i couldnt save the continuous, standard outputs into a file. Do you have any idea to do it?
prstat -u root -a -s cpu | sed -e '/^$/d;/sleep/d;/Total/d' >> stat.txt
>ls -l stat.txt
-rw-r--r-- 1... (1 Reply)
Hi guys,
I have a script from which I would like its standard output results (upon execution) to be appended to a separate file (.txt format). How can I write such a command into the script for this to occur? I know there should be a >> involved somewhere.
Thanks! (5 Replies)
hello all,
First time post here. I have searched a bit but could not find an exact answer. I have about a week's experience of Sed and Awk, and am having fun, but am a little stuck.
I am reformatting an xml file into json format. I have got this far:
{"clients":
...and so on. What I want... (22 Replies)
Hi,
I want to calculate std dev for a list of files and then print the output appended to an existing file.
I have a few folders within the directory Folder, and I am interested in getting the std dev of values in files named as time.txt. In the last pipe, if I print just the sd value, it... (1 Reply)
Discussion started by: jamie_123
1 Replies
LEARN ABOUT HPUX
merge
merge(1) General Commands Manual merge(1)NAME
merge - three-way file merge
SYNOPSIS
file1 file2 file3
DESCRIPTION
combines two files that are revisions of a single original file. The original file is file2, and the revised files are file1 and file3.
identifies all changes that lead from file2 to file3 and from file2 to file1, then deposits the merged text into file1. If the option is
used, the result goes to standard output instead of file1.
An overlap occurs if both file1 and file3 have changes in the same place. prints how many overlaps occurred, and includes both alterna-
tives in the result. The alternatives are delimited as follows:
lines in file1
lines in file3
If there are overlaps, edit the result in file1 and delete one of the alternatives.
This command is particularly useful for revision control, especially if file1 and file3 are the ends of two branches that have file2 as a
common ancestor.
EXAMPLES
A typical use for is as follows:
1. To merge an RCS branch into the trunk, first check out the three different versions from RCS (see co(1)) and rename them for
their revision numbers: 5.2, 5.11, and 5.2.3.3. File 5.2.3.3 is the end of an RCS branch that split off the trunk at file 5.2.
2. For this example, assume file 5.11 is the latest version on the trunk, and is also a revision of the "original" file, 5.2.
Merge the branch into the trunk with the command:
3. File 5.11 now contains all changes made on the branch and the trunk, and has markings in the file to show all overlapping
changes.
4. Edit file 5.11 to correct the overlaps, then use the command to check the file back in (see ci(1)).
WARNINGS
uses the ed(1) system editor. Therefore, the file size limits of ed(1) apply to
AUTHOR
was developed by Walter F. Tichy.
SEE ALSO diff3(1), diff(1), rcsmerge(1), co(1).
merge(1)