12-28-2012
Is the caret mark a literal in your file. I think we need more examples.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
Following is an output of a script
OPWQERIUTYKLSADFJHGXZNMCVBWQOPERIUTYKLSADFJHGXZNMCVB
I want to replace above string's 11 to 17 character by ******* (7 stars)
How can it be done?
Please somebody guide me. (6 Replies)
Discussion started by: anushree.a
6 Replies
2. Shell Programming and Scripting
Hello,
I have a file with many lines with below format:
\abc\\1234
jkl\\567
def\\345
\pqr\\567
\xyz\\234
Here, i need to do 2 things.
1. replace \\ with \
2. remove starting \
so output to be as below: (11 Replies)
Discussion started by: prvnrk
11 Replies
3. UNIX for Dummies Questions & Answers
I tried to replace the following in vi:
old: 'e/thesis/pp/zones/zones'
new: 'd/so162/fix/pp'
For that, I used: :%s/e/thesis/pp/zones/zones/d/so162/fix/pp/g
but doesn't work, a trailing character error message appeared. How can I get it?
Thanks in advance (3 Replies)
Discussion started by: Gery
3 Replies
4. Shell Programming and Scripting
Hi, I have a bash script and I am looking for a command that will merge specific lines together.
Sample Data:
registration time = 1300890272
Id = 1
setd = 0
tagunt = 26
tagId=6, length=8, value=
tagId=9, length=5, value=
tagId=7, length=2, value=
tagId=16, length=2, value=
tagId=32,... (8 Replies)
Discussion started by: Winsarc
8 Replies
5. Shell Programming and Scripting
Hi,
I'm attempting to rename some files that have spaces in them. Without linking sed commands together is it possible to replace the first three "." to " ".
File.name.is.long.ext -> File name is long.ext
I can get the desired effect with
echo "File.name.is.long.ext" | sed 's/\./ /g;s/... (5 Replies)
Discussion started by: vectox
5 Replies
6. Shell Programming and Scripting
Hi,
I have a input of the form:
..., word1, word2, word3...
I want out put of the form
word1, word2, word3
I tried echo '..., word1, word2, word3...' | tr -d '...,'
but that takes out the commas in the middle too so I get
word1 word2 word3
but I want the commas in the middle.
... (3 Replies)
Discussion started by: forumbaba
3 Replies
7. Shell Programming and Scripting
sed -e "s// /g" old.txt > new.txt
While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
Discussion started by: ijustneeda
11 Replies
8. Shell Programming and Scripting
Hi,
I have a text file with some lines like this:
/MEDIA/DISK1/23568742.MOV
/MEDIA/DISK1/87456321.AVI
/MEDIA/DISK2/PART1/45753131.AVI
/IMPORT/44452.WAV
...
I want to remove the last 12 characters in each line that it ends "AVI". Should look like this:
/MEDIA/DISK1/23568742.MOV... (12 Replies)
Discussion started by: inaki
12 Replies
9. Shell Programming and Scripting
Hi guys, I'm new to bash programming, so please pardon me.
I'm trying to replace an entry's text in Books.txt
This code works perfectly:
sed -i "s/$BookTitle/$NewBookTitle/g" Books.txt
But problem is, if there are double entries, it will also replace that entry. For example:
... (12 Replies)
Discussion started by: todaealas
12 Replies
10. Shell Programming and Scripting
Hi,
Im using sed on an AIX machine. I am trying to change the 137-139 characters if they are a ' 36'/'000' to a '036'. The positions that need to be changed are fixed.
the source data that I have is$cat v.txt
4000422985400050462239065593606500000007422985707771046154054910075641MC0318AMWAY... (9 Replies)
Discussion started by: dsid
9 Replies
LEARN ABOUT HPUX
sockatmark
sockatmark(3N) sockatmark(3N)
NAME
sockatmark() - determine whether a socket is at the out-of-band mark
SYNOPSIS
DESCRIPTION
The function determines whether the socket specified by the descriptor 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 mark, the function returns 1 when all
data preceding the mark has been read and the out-of-band mark is the first element in the receive queue. The function does not remove the
mark from the stream.
X/Open Sockets Only
is new in
RETURN VALUES
Upon successful completion, the 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.
If there is no mark, or if data
precedes the mark in the receive queue.
On failure, returns and sets to indicate the error.
ERRORS
If fails, is set to one of the following values:
The argument is not a valid file descriptor.
The argument does not specify a descriptor for a socket.
APPLICATION 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 be at
the "mark". However, the system has no way of knowing that the next data segment arriving from the network is carrying the mark. Then
returns false, and the next read operation silently consumes the mark.
Hence, this function can only be used reliably in one or both ways:
o when the application already knows that the out-of-band data has been seen by the system
o and that it knows data is waiting to be read at the socket (by using or
AUTHOR
was developed by HP and IEEE.
SEE ALSO
ioctl(2), pselect(2), recv(2), recvmsg(2), socket(7).
STANDARDS CONFORMANCE
sockatmark(3N)