I am trying to merge two large file horizontally using paste command. Every thing is working fine except for time. Its taking lot of time.
Is there any effiecient way of doing the same thing or is there anyway by which I can improve its perfomance programatically?
Thanks,
Yeheya (1 Reply)
This is likely to be a dumb one.
How can I use sed to substitute string occurances having it read from an input file and write to this very same file ?
I have a file with lots of occurances of '2006', I want to change it to '2007', but I'd like these changes to be saved on the input file.
... (5 Replies)
Hi Every body,
I have file which has enttries, with each 5 entries as a set of entries, I would like to read the file (line by line) and print five entries of a set vertically, the next entry should come in the next line.
Example:
cat sample_file
I am a
Unix Adminsitrator
new to shell... (6 Replies)
Hi,
This is the first time playing around with perl and need some help.
Assuming if i have a line of text that looks like this:
Date/Time=Nov 18 17:12:11;Device Name=192.168.1.1;Device IP=192.168.1.1;Device Class=IDS;Source IP=155.212.212.111;Source Name=UNKNOWN;Source Port=1679... (3 Replies)
Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP.
I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Hi All,
I am having an XML tag like:
<detail sim_ser_no_1="898407109001000090"
imsi_1="452070001000090">
<security>ADM1=????</security>
<security>PIN1=????</security>
<security>PIN2=????</security>
... (2 Replies)
Hi
What is the syntax for if statement using && and || operator?
if && ] ||
here its giving me an error to this if statement
any suggestion?? (2 Replies)
I have got an Perl array like:
@array = (1,2,3,4,5,6,1,2,3,4,1,2,1,2,3,4,5,6,7,8,9...............)
This numeric sequence will be always sequentially increasing, unless it encounters, The beginning of the new sequentially increasing numeric sequence.
SO in this array we get sequentially... (5 Replies)
I have 1 file that has elements as follows. Also the CVR(10) and the word "SAUCE" only appear once in the file so maybe a grep command would work?
file1
CVR( 9) = 0.385E+05, ! VEHICLE
CVR(10) = 0.246E+05, ! SAUCE
CVR(11) = 0.162E+03, ! VEHICLE
I need to extract the... (6 Replies)
I am a scripting noob, and having much trouble getting this script to run correctly. Upon start it should read the home directory and sort the files into a text file. Then have user enter a user name and insert it into line 1 of the same text file. Then have the date insert into the second line of... (8 Replies)
Discussion started by: bbaumg02
8 Replies
LEARN ABOUT SUNOS
pts
pts(7D) Devices pts(7D)NAME
pts - STREAMS pseudo-tty slave driver
DESCRIPTION
The pseudo-tty subsystem simulates a terminal connection, where the master side represents the terminal and the slave represents the user
process's special device end point. In order to use the pseudo-tty subsystem, a node for the master side driver /dev/ptmx and N nodes for
the slave driver (N is determined at installation time) must be installed. The names of the slave devices are /dev/pts/M where M has the
values 0 through N-1. When the master device is opened, the corresponding slave device is automatically locked out. No user may open that
slave device until its permissions are adjusted and the device unlocked by calling functions grantpt(3C) and unlockpt(3C). The user can
then invoke the open system call with the name that is returned by the ptsname(3C) function. See the example below.
Only one open is allowed on a master device. Multiple opens are allowed on the slave device. After both the master and slave have been
opened, the user has two file descriptors which are end points of a full duplex connection composed of two streams automatically connected
at the master and slave drivers. The user may then push modules onto either side of the stream pair. The user needs to push the ptem(7M)
and ldterm(7M) modules onto the slave side of the pseudo-terminal subsystem to get terminal semantics.
The master and slave drivers pass all messages to their adjacent queues. Only the M_FLUSH needs some processing. Because the read queue
of one side is connected to the write queue of the other, the FLUSHR flag is changed to the FLUSHW flag and vice versa. When the master
device is closed an M_HANGUP message is sent to the slave device which will render the device unusable. The process on the slave side gets
the errno EIO when attempting to write on that stream but it will be able to read any data remaining on the stream head read queue. When
all the data has been read, read returns 0 indicating that the stream can no longer be used. On the last close of the slave device, a
0-length message is sent to the master device. When the application on the master side issues a read() or getmsg() and 0 is returned, the
user of the master device decides whether to issue a close() that dismantles the pseudo-terminal subsystem. If the master device is not
closed, the pseudo-tty subsystem will be available to another user to open the slave device. Since 0-length messages are used to indicate
that the process on the slave side has closed and should be interpreted that way by the process on the master side, applications on the
slave side should not write 0-length messages. If that occurs, the write returns 0, and the 0-length message is discarded by the ptem mod-
ule.
The standard STREAMS system calls can access the pseudo-tty devices. The slave devices support the O_NDELAY and O_NONBLOCK flags.
EXAMPLES
int fdm fds;
char *slavename;
extern char *ptsname();
fdm = open("/dev/ptmx", O_RDWR); /* open master */
grantpt(fdm); /* change permission of slave */
unlockpt(fdm); /* unlock slave */
slavename = ptsname(fdm); /* get name of slave */
fds = open(slavename, O_RDWR); /* open slave */
ioctl(fds, I_PUSH, "ptem"); /* push ptem */
ioctl(fds, I_PUSH, "ldterm"); /* push ldterm*/
FILES
/dev/ptmx master clone device
/dev/pts/M slave devices (M = 0 -> N-1)
SEE ALSO grantpt(3C), ptsname(3C), unlockpt(3C), ldterm(7M), ptm(7D), ptem(7M)
STREAMS Programming Guide
SunOS 5.10 21 Aug 1992 pts(7D)