I need to insert a file called temp_impact (which has about 15 lines in it) to a file called 11.23cfg starting at line 33. I searched the forums and found the
sed '34i\
test' 11.23cfg > newfile
That will enter word test at the appropriate line, but i need the entire file dumped there. Any... (4 Replies)
how to insert a extra line in a text file using a sh command
iam trying to think of a way to add a extra line but without deleting the whole text
do anyone have any ideas (2 Replies)
So I need to write lines into line X of file X.
I can get the file by doing:
cfgnumber=$(cat -n -comm.cfg| grep -i "servicegroup_name 24x7-comunicacions")
echo $cfgnumber
it outputs the Line where it finds now I need to start writing something right bellow that line.
thanks (10 Replies)
Dear Folks :),
I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp.
I can do this in vi editor by using this command :g/^/s//BBB_
e,g I have a file named as Test.dat and it containins below text:
michal... (4 Replies)
I can't seem to get sed to allow me to insert text in the first line of an empty file. I have a file.txt that is a 0 byte file. I want sed to insert " fooBar" onto the first line. I've tried a few options and nothing seems to work. They work just fine if there's text in the file tho. Help? (4 Replies)
sed '1r file.txt' <source.txt >desti.txt
This example will insert 'file.txt' between line 1 and 2 of source.txt.
sed '0r file.txt' <source.txt >desti.txt
gives an error message.
Does anyone know how 'sed' can insert 'file.txt' before the first line of source.txt? (18 Replies)
Hello,
I am looking to automate a task - which is updating an existing access control instruction of a server and making sure that the attributes defined in the instruction is in sorted order. The instructions will be of a specific syntax.
For example lets assume below listed is one of an... (6 Replies)
I have a test file that I want to read and insert only certain lines into the
the table based on a filter.
1. Rread the log file 12 Hours back Getdate() -12 Hours
2. Extract the following information on for lines that say "DUMP is
complete"
A. Date
B. Database Name
C.... (2 Replies)
Hi All,
I am using UNix Sun OS sun4u sparc SUNW,SPARC-Enterprise
My intention is to insert a line of text after 13th line of every file inside a particular directory.
While trying to do it for a single file , i am using sed
sed '3 i this is the 4th line' filename
sed: command garbled: 3... (5 Replies)
Discussion started by: gotamp
5 Replies
LEARN ABOUT ULTRIX
sortbib
sortbib(1) General Commands Manual sortbib(1)Name
sortbib - sort bibliographic database
Syntax
sortbib [-sKEYS] database...
Description
The command sorts files of records containing refer key-letters by user-specified keys. Records may be separated by blank lines, or by .[
and .] delimiters, but the two styles may not be mixed together. This program reads through each database and pulls out key fields, which
are sorted separately. The sorted key fields contain the file pointer, byte offset, and length of corresponding records. These records
are delivered using disk seeks and reads, so may not be used in a pipeline to read standard input.
By default, alphabetizes by the first %A and the %D fields, which contain the senior author and date. The -s option is used to specify new
KEYS. For instance, -sATD will sort by author, title, and date, while -sA+D will sort by all authors, and date. Sort keys past the fourth
are not meaningful. No more than 16 databases may be sorted together at one time. Records longer than 4096 characters will be truncated.
The command sorts on the last word on the %A line, which is assumed to be the author's last name. A word in the final position, such as
``jr.'' or ``ed.'', will be ignored if the name beforehand ends with a comma. Authors with two-word last names or unusual constructions
can be sorted correctly by using the convention `` '' in place of a blank. A %Q field is considered to be the same as %A, except sorting
begins with the first, not the last, word. The command sorts on the last word of the %D line, usually the year. It also ignores leading
articles (like ``A'' or ``The'') when sorting by titles in the %T or %J fields; it will ignore articles of any modern European language.
If a sort-significant field is absent from a record, places that record before other records containing that field.
Options-sKEYS
Specifies new sort KEYS. For example, ATD sorts by author, title, and date.
See Alsoaddbib(1), indxbib(1), lookbib(1), refer(1), roffbib(1)sortbib(1)