06-10-2013
I got it to work.
Thanks to all the respondants.
It was actually a Carriage Return/Line Feed that I needed to delete from the file.
10 More Discussions You Might Find Interesting
1. Programming
i would like advice on the usbject of c programming (in the middle of reading a book on C). could i benefit more if i apply that knowledge in the unix format if i were able to, or would that take the point out of learning C, basically I want to stay away from strying too far away from unix and use... (1 Reply)
Discussion started by: moxxx68
1 Replies
2. Shell Programming and Scripting
Several months ago I found a link that explained the difference between how a Unix Systems Admin would do scripting compared to what a Unix Programmer would do.
It showed a basic script and then show several iterations that explained how the Systems Admin would change it to make it better. I was... (0 Replies)
Discussion started by: BCarlson
0 Replies
3. Shell Programming and Scripting
I am doing the following script in k shell
sed -i 's/FILENAME/$i/g' TEST/test$j.ctl > TEST/control$j.ctl
In the file it replaces $i for all FILENAME, it doesnot replace with the value of i. I put single quotes like below
sed -i 's/FILENAME/'$i'/g' TEST/test$j.ctl > TEST/control$j.ctl
I... (9 Replies)
Discussion started by: toshidas2000
9 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I am trying to learn Networking Programming in C in unix enviorment. I want to know how good it is to become a network programmer. i am crazy about Network programming but i also want to opt for the best carreer options. Anybody experienced Network Programmer, please tell me is my... (5 Replies)
Discussion started by: vibhory2j
5 Replies
5. Programming
Can someone help me on suggesting some ways to access the memory content in RAM directly from C/C++ source code.
Please provide me any book name or any URL so that I can get an exhaustive
knowledge over it.
If possible please give me some tips on interacting with hardwares directly
through... (3 Replies)
Discussion started by: nandumishra
3 Replies
6. UNIX for Dummies Questions & Answers
How does unix system administration, unix programming, unix network programming differ?
Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies
7. UNIX for Dummies Questions & Answers
Hello.
I like Linux and C programming language. Allways wanted to understand kernel and become a Linux system programmer. And I also like Objective-C and iOS. These two programming areas have relations:
1. Linux and iOS are UNIX-like systems, POSIX compliant.
2. It is useful to know C language... (2 Replies)
Discussion started by: Rockatansky
2 Replies
8. Shell Programming and Scripting
Hi All,
can any one help me on this please.
Replace sting in FILE1.txt with FILE2.txt. FILE1.txt record must have at least one state is repeated once.But need to replace only from second occurrence in record in FILE1.txt
Condition: order of searching the records in FILE2.txt is impartent.... (8 Replies)
Discussion started by: ureddy
8 Replies
9. UNIX for Advanced & Expert Users
I hope my title is accurate enough.
I have a product that we port to various UNIX platforms. It is known to run on AIX but using the IBM compiler from years ago. Recently we got a different used AIX P5 platform running AIX 5.3 and we setup the GCC compiler (4.4.5 I think). C and C++ source code.... (5 Replies)
Discussion started by: Pug
5 Replies
10. Shell Programming and Scripting
Dears,
I want to print filename and count of each file in perl but failing to implement.
`find $srcFolder -maxdepth 1 -type f -name "*$workDate*$fileExt" -exec sh -c ' && printf "$workDate|%s|%s\n" "$(wc -l<"$0")" *$workDate*$fileExt' {} \ >> /Sadique/filelog.out \\; 2> /dev/null`;
... (2 Replies)
Discussion started by: sadique.manzar
2 Replies
LEARN ABOUT OPENSOLARIS
sockatmark
sockatmark(3XNET) X/Open Networking Services Library Functions sockatmark(3XNET)
NAME
sockatmark - determine whether a socket is at the out-of-band mark
SYNOPSIS
cc [ flag ... ] file ... -lxnet [ library ... ]
#include <sys/socket.h>
int sockatmark(int s);
DESCRIPTION
The sockatmark() function determines whether the socket specified by the descriptor s is at the out-of-band data mark. If the protocol for
the socket supports out-of-band data by marking the stream with an out-of-band data mark, the sockatmark() function returns 1 when all data
preceding the mark has been read and the out-of-band data mark is the first element in the receive queue. The sockatmark() function does
not remove the mark from the stream.
RETURN VALUES
Upon successful completion, the sockatmark() function returns a value indicating whether the socket is at an out-of-band data mark. If the
protocol has marked the data stream and all data preceding the mark has been read, the return value is 1. If there is no mark, or if data
precedes the mark in the receive queue, the sockatmark() function returns 0. Otherwise, it returns -1 and sets errno to indicate the error.
ERRORS
The sockatmark() function will fail if:
EBADF The s argument is not a valid file descriptor.
ENOTTY The s argument does not specify a descriptor for a socket.
USAGE
The use of this function between receive operations allows an application to determine which received data precedes the out-of-band data
and which follows the out-of-band data.
There is an inherent race condition in the use of this function. On an empty receive queue, the current read of the location might well be
at the "mark", but the system has no way of knowing that the next data segment that will arrive from the network will carry the mark, and
sockatmark() will return false, and the next read operation will silently consume the mark.
Hence, this function can only be used reliably when the application already knows that the out-of-band data has been seen by the system or
that it is known that there is data waiting to be read at the socket, either by SIGURG or select(3C).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO
recv(3XNET), recvmsg(3XNET), select(3C), attributes(5), standards(5)
SunOS 5.11 1 Oct 2003 sockatmark(3XNET)