Hi, excuse me for my poor english.
My problem is that:
I have a File
i want to add to each line of that file two strings: one at the beginning of the line, one at the ending.
string1="abcd"
string2="efgh"
i want $string1 content $string2 for each line.
Is that possible? (3 Replies)
Im trying to add 5 blank spaces to the end of each line in a file in a sed script. I can figure out who o put the spaces pretty much anywhere else but at the end.
thanks
Karl (7 Replies)
Hello All,
I have a doubt in sed, i want to add some parameter at the end of the tag inside a xml tag. how to i do that. so i want to add Results="true" value="high" inside the xml tag.
Orignal
<execute description="reboot">
<execute description="Stop Servlet">
After adding the... (5 Replies)
What is a regex for "the dalai lama, his holiness the"
that would just grab "the dalai lama"
and one that would just grab "his holiness the"? Both should exclude the comma..
I was trying '^.*' and many variants with no luck. (6 Replies)
How can I specify special meaning characters like ^ or $ inside a regex range. e.g
Suppose I want to search for a string that either starts with '|' character or begins with start-of-line character.
I tried the following but it does not work:
sed 's/\(\)/<do something here>/g' file1
... (3 Replies)
Well here goes:
I tried to write a batch file that adds a specific fixed text to each line of an already existing text file.
for the adding text infront of each line I tried this:
for /F "delims=" %%j in (list.txt) do echo.STARTTEXT\%%j >> list.txt
for adding text after each line I... (0 Replies)
How would you do vim copy line and paste at the beginning, middle, and end of another line. I know yy copies the whole line and p pastes the whole line, but on its own separate line. Sometimes I would like to copy a line to the beginning, middle, or end of another line. I would think this would be... (3 Replies)
I have been trying to insert a line after a regex but I can't do it. Here is the code I am using:
cat saved_doc
SET type = type1
SET type = STORE = y
/vol/san_e1
/vol/san_5
/vol/san_e9
/vol/san_e11
/vol/san_e12
/vol/san_e13
/vol/san_e14
/vol/san_e16
/vol/san_e17
/vol/san_e18... (4 Replies)
Hi,
I have a specific requirement to add text at the beginning and end of a plain text file. I tried to use "sed" with '1i' and '$a' flags but these required two separate "sed" commands separated with "|".
I am looking for some command/option to join these two in single command parameter.
... (6 Replies)
SUSE linux
bash shell
this works
test -d /tmpp && echo "directory exists" || echo "directory doesn't exists" |sed -e "s/^/prefix /"
prefix directory doesn't exists
but why doesn't this work?
test -d /tmp && echo "directory exists" || echo "directory doesn't exists" |sed -e... (3 Replies)
Discussion started by: snoman1
3 Replies
LEARN ABOUT HPUX
elf_ndxscn
elf_getscn(3E)elf_getscn(3E)NAME
elf_getscn(), elf_ndxscn(), elf_newscn(), elf_nextscn() - get section information for ELF files
SYNOPSIS
Command: [flag]... file... [library]...
DESCRIPTION
These functions provide indexed and sequential access to the sections associated with the ELF descriptor elf. If the program is building a
new file, it is responsible for creating the file's ELF header before creating sections; see elf_getehdr(3E).
returns a section descriptor, given an index into the file's section header table. Note the first "real" section has index 1. Although a
program can get a section descriptor for the section whose index is 0 the undefined section), the section has no data and the section
header is "empty" (though present). If the specified section does not exist, an error occurs, or elf is null, returns a null pointer.
creates a new section and appends it to the list for elf. Because the section is required and not "interesting" to applications, the
library creates it automatically. Thus the first call to for an ELF descriptor with no existing sections returns a descriptor for section
1. If an error occurs or elf is null, returns a null pointer.
After creating a new section descriptor, the program can use to retrieve the newly created, "clean" section header. The new section
descriptor will have no associated data (see elf_getdata(3E)). When creating a new section in this way, the library updates the member of
the ELF header and sets the bit for the section (see elf_flag(3E)). If the program is building a new file, it is responsible for creating
the file's ELF header (see elf_getehdr(3E)) before creating new sections.
takes an existing section descriptor, scn, and returns a section descriptor for the next higher section. One may use a null scn to obtain
a section descriptor for the section whose index is 1 (skipping the section whose index is If no further sections are present or an error
occurs, returns a null pointer.
takes an existing section descriptor, scn, and returns its section table index. If scn is null or an error occurs, returns
EXAMPLES
An example of sequential access appears below. Each pass through the loop processes the next section in the file; the loop terminates when
all sections have been processed.
scn = 0;
while ((scn = elf_nextscn(elf, scn)) != 0)
{
/* process section */
}
SEE ALSO elf(3E), elf_begin(3E), elf_flag(3E), elf_getdata(3E), elf_getehdr(3E), elf_getshdr(3E).
elf_getscn(3E)