11-12-2016
Hi Singh,
Thanks for your reply, sorry it didn't work out, it again failed because of the special characters in it.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I used following to add * at the end of the line in file1.
It adds * at the end but has a space before it for some lines but some other lines it adds exactly after the last character.
How do I take out the space ?
sed 's/$/*/' file1 > file2
example:
contents of file1 :
... (2 Replies)
Discussion started by: pitagi
2 Replies
2. Shell Programming and Scripting
Hi,
I want to add \n as a EOF at the end of file if it does't exist in a single command. How to do this?
when I use command
echo "1\n" > a.txt
and
od -c a.txt
0000000 1 \n \n
0000003
How does it differentiate \n and eof in this case?
Regards,
Venkat (1 Reply)
Discussion started by: svenkatareddy
1 Replies
3. Shell Programming and Scripting
HI,
Here I have the following output and want to do some mathematical calculation on C2 & C3 column.
c1 c2 c3 c4 c5
l1 1-oct 12:30:01 12:35 abc xyz
l2 1-oct 14:20:01 14:35 def ... (5 Replies)
Discussion started by: dear_abhi2007
5 Replies
4. Shell Programming and Scripting
Hi I am working on a bash script and would know how to use cut or sed to remove
(F/.M/d h) from a text file.
Before
1 text to save (F/.M/d h)
after
1 text to save
Thanks in advance (5 Replies)
Discussion started by: pelle
5 Replies
5. Shell Programming and Scripting
Hi, I wish to replace a new line with br (html) but it doesn't seem to work
message=$(echo ${FORM_message} | tr '\r' '<br \/>' )
what it gives me seems to be ... b...?
I am also having problem escaping hash sign in cut command:
list=$(echo "$line" | cut -d'\#;\#' -f1) ;
my intention is... (2 Replies)
Discussion started by: ted_chou12
2 Replies
6. UNIX Desktop Questions & Answers
hey ,
i want to check if the char "#" exist at the end of every line of txt file
and if it dosent then add it for example:
the cat jumped on my mom #
cars can run on water#
i cant get a date
blue
yellow#
will be:
the cat went back home#
cars can run on water#
i cant get a... (2 Replies)
Discussion started by: boaz733
2 Replies
7. Shell Programming and Scripting
I'm trying to add a '1' before a line that has the word "C_ID"
s/.*C_ID.*/&\n1/
The above code did what I need, but the '1' is added after the C_ID word :( Help please. (5 Replies)
Discussion started by: newbeee
5 Replies
8. Shell Programming and Scripting
Hello experts,
I need to convert one file into readable format.
Input file is like following line.
STG,12345,000,999,' PQR, 2345,000,999,' XYZ,7890,000,999,
Output should be following (After ' char new line char should be added.)
STG,12345,000,999,'
PQR, 2345,000,999,' ... (16 Replies)
Discussion started by: meetmedude
16 Replies
9. Shell Programming and Scripting
Hi All,
i'm working on some report and currently have this plain text file generated.
server_name1|sdfd1deal | 1048572| 1040952| 99| 207| 1| 1
server_name1|dba1dbs | 83886048| 40730796| 48| 5762| 22764| 8... (4 Replies)
Discussion started by: fedora132010
4 Replies
10. SCO
In COBOL, a hyphen can be used in a field name and in a specific program some field names would be identical to others except a suffix was added--sometimes a suffix to a suffix was used. For example, assume I am looking for AAA, AAA-BBB, and AAA-BBB-CCC and don't want to look at AAA-BBB-CCC... (7 Replies)
Discussion started by: wbport
7 Replies
LEARN ABOUT DEBIAN
net::dbus::asyncreply
Net::DBus::ASyncReply(3pm) User Contributed Perl Documentation Net::DBus::ASyncReply(3pm)
NAME
Net::DBus::ASyncReply - asynchronous method reply handler
SYNOPSIS
use Net::DBus::Annotation qw(:call);
my $object = $service->get_object("/org/example/systemMonitor");
# List processes & get on with other work until
# the list is returned.
my $asyncreply = $object->list_processes(dbus_call_async, "someuser");
while (!$asyncreply->is_ready) {
... do some background work..
}
my $processes = $asyncreply->get_result;
DESCRIPTION
This object provides a handler for receiving asynchronous method replies. An asynchronous reply object is generated when making remote
method call with the "dbus_call_async" annotation set.
METHODS
$asyncreply->discard_result;
Indicates that the caller is no longer interested in recieving the reply & that it should be discarded. After calling this method, this
object should not be used again.
$asyncreply->wait_for_result;
Blocks the caller waiting for completion of the of the asynchronous reply. Upon returning from this method, the result can be obtained
with the "get_result" method.
my $boolean = $asyncreply->is_ready;
Returns a true value if the asynchronous reply is now complete (or a timeout has occurred). When this method returns true, the result
can be obtained with the "get_result" method.
$asyncreply->set_notify($coderef);
Sets a notify function which will be invoked when the asynchronous reply finally completes. The callback will be invoked with a single
parameter which is this object.
my @data = $asyncreply->get_result;
Retrieves the data associated with the asynchronous reply. If a timeout occurred, then this method will throw an exception. This
method can only be called once the reply is complete, as indicated by the "is_ready" method returning a true value. After calling this
method, this object should no longer be used.
AUTHOR
Daniel Berrange <dan@berrange.com>
COPYRIGHT
Copright (C) 2006-2011, Daniel Berrange.
SEE ALSO
Net::DBus, Net::DBus::RemoteObject, Net::DBus::Annotation
perl v5.14.2 2011-06-30 Net::DBus::ASyncReply(3pm)