01-15-2008
If I need this way, How can I do that?
From
1|2|3|4|
2|3|4|5|
3|4|5|6|
4|5|6|7|
Change to
1|2|3|4|;2|3|4|5|;3|4|5|6|;4|5|6|7|;
Which are
replace "|" at the end of the line to "|;" (pipe and semicolon) then pull up the next line on to the same line.
Thanks again
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have already read a lot of posts on sending attachments in unix...but none of them were of help for my problem...so here goes..
i wanna attach a text file and send to a mail id..used the following code :
uuencode "$File1" "$File1" ;|mail -s "$Mail_sub" abc@abc.com
it works... (2 Replies)
Discussion started by: ash22
2 Replies
2. Shell Programming and Scripting
Hi expersts,
in my directory i have *.txt and *.TXT and *.TXT.log, *.txt.log
I want list only .txt and .TXT files in one command...
how to ??
//purple (1 Reply)
Discussion started by: thepurple
1 Replies
3. Shell Programming and Scripting
Hello everyone,
ive been trying to replace a string "kw01" in an xml file with the contents of a txt file having multiple lines. im a unix newbie and all the sed combinations i tried resulted to being garbled. Below is the contents of the txt file:
RAISEDATTIME
--------------------... (13 Replies)
Discussion started by: 4dirk1
13 Replies
4. UNIX for Advanced & Expert Users
Hi There...
I need to serach and replace strngs in a text file.
My file has;
books.amazon='Let me read'
news.bestseller='xyz'
expected output is
books.amazon=NONFOUND
news.bestseller=NONFOUND
Can I first find the text between string1= books.amazon=' and string2= ' (locate the text... (1 Reply)
Discussion started by: Hiano
1 Replies
5. Shell Programming and Scripting
This is appending a column.
My question is fairly simple. I have a program generating data in a form like so:
1 20
2 22
3 23
4 12
5 43
For ever iteration I'm generating this data. I have the basic idea with cut -f 2 fileA.txt | paste -d >> FileB.txt ???? I want FileB.txt to grow, and... (4 Replies)
Discussion started by: theawknewbie
4 Replies
6. Shell Programming and Scripting
Hi i am having XML file with many number of lines,I need to replace between two strings with .txt file using awk.
For ex
<PersonInfoShipTo ------------------------------ />
My requirement is to replace the content between
<PersonInfoShipTo ------------------------------ />
help me.
Thanks... (9 Replies)
Discussion started by: Padmanabhan
9 Replies
7. Shell Programming and Scripting
I want to add/append the info in the following format to my.txt file.
20130702|abcd20130702.txt FN|SN|DOB
I tried the below script but it throws me some exceptions.
<#!/bin/sh
dt = date '+%y%m%d'members;
echo $dt+|+members+$dt;
/usr/bin/awk -f
BEGIN { FS="|"; OFS="|"; } { print... (6 Replies)
Discussion started by: harik1982
6 Replies
8. Windows & DOS: Issues & Discussions
so...
Lets assume I have a text file.
The text file contains multiple "#" symbols.
I want to replace all thos "#"s with a STRING using DOS/Batch
I want to add a certain TEXT to the end of each line.
How can I do this WITHOUT aid of sed, grep or anything linux related ? (1 Reply)
Discussion started by: pasc
1 Replies
9. Shell Programming and Scripting
Dear all,
I have a huge txt file (DATA.txt) with the following content . From this txt file, I want the following output using some shell script.
Any help is greatly appreciated.
Greetings,
emily
DATA.txt (snippet of the huge text file)
407202849... (2 Replies)
Discussion started by: emily
2 Replies
10. UNIX for Dummies Questions & Answers
Hi
I have a large txt file on my AIX server and I need to replace some text using two other files. So filename1 has about 500 lines similar to:
txtcode SYStem100
I have the string I want to change in string2 and the new stringname in string3. Does anyone know a way of doing this? I have... (1 Reply)
Discussion started by: Grueben
1 Replies
connld(7M) STREAMS Modules connld(7M)
NAME
connld - line discipline for unique stream connections
SYNOPSIS
#include </sys/steam.h>
int ioctl(fd,I_PUSH,"connld");
DESCRIPTION
connld is a STREAMS-based module that provides unique connections between server and client processes. It can only be pushed (see
streamio(7I)) onto one end of a STREAMS-based
pipe that may subsequently be attached to a name in the file system name space with fattach(3C). After the pipe end is attached, a new
pipe is created internally when an originating process attempts to open(2) or creat(2) the file system name. A file descriptor for one
end of the new pipe is packaged into a message identical to that for the ioctl I_SENDFD (see streamio(7I)) and is transmitted along the
stream to the server process on the other end. The originating process is blocked until the server responds.
The server responds to the I_SENDFD request by accepting the file descriptor through the I_RECVFD ioctl message. When this happens, the
file descriptor associated with the other end of the new pipe is transmitted to the originating process as the file descriptor returned
from open(2) or creat(2).
If the server does not respond to the I_SENDFD request, the stream that the connld module is pushed on becomes uni-directional because the
server will not be able to retrieve any data off the stream until the I_RECVFD request is issued. If the server process exits before
issuing the I_RECVFD request, the open(2) or the creat(2) invocation will fail and return -1 to the originating process.
When the connld module is pushed onto a pipe, it ignores messages going back and forth through the pipe.
ERRORS
On success, an open of connld returns 0. On failure, errno is set to the following values:
EINVAL A stream onto which connld is being pushed is not a pipe or the pipe does not have a write queue pointer pointing to a
stream head read queue.
EINVAL The other end of the pipe onto which connld is being pushed is linked under a multiplexor.
EPIPE connld is being pushed onto a pipe end whose other end is no longer there.
ENOMEM An internal pipe could not be created.
ENXIO An M_HANGUP message is at the stream head of the pipe onto which connld is being pushed.
EAGAIN Internal data structures could not be allocated.
ENFILE A file table entry could not be allocated.
SEE ALSO
creat(2), open(2), fattach(3C), streamio(7I)
STREAMS Programming Guide
SunOS 5.10 3 May 2004 connld(7M)