08-28-2008
sed -e 'N;s/\n//g' filename
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
File 1
<html>ta da....unique file name I want to give file=>343...</html>
<html>da ta 234 </html>
<html>pa da 542 </html>
and so on...
File 2
343
234
542
and so on, each line in File 1 one also corresponds with each line in File 2
I have tried several grep, sed, while .. read, do,... (4 Replies)
Discussion started by: web_developer
4 Replies
2. Shell Programming and Scripting
So, I want to read line-by-line a text file with unknown number of files....
So:
a=1
b=1
while ; do
b=`sed -n '$ap' test`
a=`expr $a + 1`
$here do something with b etc
done
the problem is that sed does not seem to recognise the $a, even when trying
sed -n ' $a p'
So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies
3. Solaris
I get a file which has all its content in a single row.
The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file.
I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies
4. Shell Programming and Scripting
Hi All,
I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Discussion started by: mjavalkar
4 Replies
5. Shell Programming and Scripting
Hello All,
I have following file contents
cat file
#line=aaaaaa
#line=bbbbbb
#line=cccccc
#line=dddddd
line=eeeeee
#comment=11111
#comment=22222
#comment=33333
#comment=44444
comment=55555
Testing script
Good Luck!
I would like to comment line line=eeeeee and insert a new line... (19 Replies)
Discussion started by: manishdivs
19 Replies
6. Shell Programming and Scripting
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies
7. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
8. Shell Programming and Scripting
Hi all,
I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like:
<date1>|<data1>|<url1>|<result1>
<date2>|<data2>|<url2>|<result2>
<date3>|<data3>|<url3>|<result3>
<date4>|<data4>|<url4>|<result4>
What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies
9. UNIX for Beginners Questions & Answers
Input file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies
LEARN ABOUT HPUX
nlist_ia
nlist_ia(3C) nlist_ia(3C)
NAME
nlist_ia: nlist(), nlist64() - get entries from name list on Integrity systems
SYNOPSIS
Command: [flag]... [library]...
Remarks
The use of symbol table type and value information is inherently nonportable. The use of or should reduce the effort required to port a
program that uses such information, but complete portability across all HP-UX implementations cannot be expected.
This manpage describes and for Itanium-based systems. For and on PA-RISC systems, see nlist_pa(3C).
DESCRIPTION
and have basically the same functionality and they can process SOM or ELF files. The structure is the same as and is used for source code
compatibility.
The or function examines the name list in the executable file whose name is pointed to by file_name, and selectively extracts a list of
values and puts them in the array of structures pointed to by nl. The array of structures initially contains only the names of variables.
Once the or function has been called, the variable names are augmented with symbol information. The list is terminated by a null name,
which consists of a null string in the variable-name position of the structure. The name list of the file is searched for each variable
name. If the name is found, the symbol's type, scope, and value in the file is inserted into the name list structure. If the file
searched is an ELF file, the section index is also inserted. For SOM files, the subspace index is inserted. The symbol value is 64-bit.
If the file searched is a SOM file, then the value field is zero padded. If the name is not found, the fields in the name list structure
are set to 0. The structures and are defined in the include file See a.out(4) and nlist(4) for further description of the symbol table
structure.
The file must have the organization and symbol table described for an file in a.out(4). The information is extracted from the symbol table
used by the linker, ld(1).
On machines that have such a file, this subroutine is useful for examining the system name list kept in file In this way programs can
obtain system addresses that are up to date.
RETURN VALUE
All structure fields are set to 0 if the file cannot be found or if it is not a valid object file containing a linker symbol table.
and return:
An error occurred.
Success.
WARNINGS
The header file is automatically included by for compatibility. However, including is discouraged if the only information needed from is
for use by or If is included, the line may need to follow it.
SEE ALSO
ld(1), elf(3E), a.out(4), nlist(4).
STANDARDS CONFORMANCE
Integrity Systems Only nlist_ia(3C)