04-27-2015
Quote:
Originally Posted by
RudiC
.
.
.
If it's the last line, quit.
.
.
.
I think this needs to be slightly modified: If it's the last line, delete the pattern space, print that (empty space) and quit.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi group,
I want to replace the occurance of a particular text in a paragraph.I tried with Sed,but Sed only displays the result on the screen.How can i update the changes in the original file???
The solution should be a one liner using awk and sed.
Thanks in advance. (5 Replies)
Discussion started by: bishnu.bhatta
5 Replies
2. Shell Programming and Scripting
Execution of the following segment is giving the error -
Script extract:-
OUT=$DATADIR/sol_rsult_orphn.bcp
TMP1=${OUT}_tmp1
TMP=${OUT}_tmp
( isql -w 400 $dbConnect_OPR <<EOF
select convert(char(10), s.lead_id)
+'|'
+ s.pho_loc_type,
";",
s.sol_rsult_cmnt,
";",
+'|'+ s.del_ind... (3 Replies)
Discussion started by: kzmatam
3 Replies
3. Shell Programming and Scripting
I need to print specific lines from a file, say 2-5, 8, 12-15, 17, 19, 21-27. How do I achieve this? (2 Replies)
Discussion started by: Ilja
2 Replies
4. Shell Programming and Scripting
I want to use SED to replace all new line characters of a file, I googled and found this one liner
sed '{:q;N;s/\n//g;t q}' infile
what do :q;N; and t q mean in this script? (6 Replies)
Discussion started by: kevintse
6 Replies
5. Shell Programming and Scripting
sed awk one liner (2 Replies)
Discussion started by: jap2614
2 Replies
6. Shell Programming and Scripting
hey everyone,
I want to remove some characters from a string that i have with sed. For example if my string is:
a0=bus a1=car a2=truck
I want my output to look like this:
bus car truck
So i want to delete the two characters before the = and including the =. This is what i came up with... (3 Replies)
Discussion started by: GmGeubt
3 Replies
7. UNIX for Advanced & Expert Users
Can anyone explain the below sed oneliner?
sed -e ':a' -e '$q;N;11,$D;ba'
It works same as tail command.
I just want to know how it works.
Thanks
---------- Post updated at 11:42 PM ---------- Previous update was at 11:37 PM ----------
Moderators,
Can you please delete this thread?... (0 Replies)
Discussion started by: pandeesh
0 Replies
8. UNIX for Advanced & Expert Users
Can anyone explain the below sed oneliner?
sed -e ':a' -e '$q;N;11,$D;ba'
It works same as tail command.
I just want to know how it works.
Thanks (1 Reply)
Discussion started by: pandeesh
1 Replies
9. UNIX for Dummies Questions & Answers
I have a data base of part numbers:
AAA Thing1
BBB Thing2
CCC Thing3
File one is a list of part numbers:
AAA234
BBB678
CCC2345
Is there a sed one-line that would compare a data base with and replace the part numbers so that the output looks like this?
AAA234 Thing1
BBB678 Thing2... (5 Replies)
Discussion started by: jimmyf
5 Replies
10. UNIX for Dummies Questions & Answers
I have a data base of part numbers:
AAA Thing1
BBB Thing2
CCC Thing3
File one is a list of part numbers:
XXXX AAA234
XXXX BBB678
XXXX CCC2345
Is there a sed one-line that would compare a data base with and replace the part numbers so that the output looks like this?
XXXX AAA234... (7 Replies)
Discussion started by: jimmyf
7 Replies
LEARN ABOUT DEBIAN
roar_terminate
roar_exit(3) System Manager's Manual: RoarAudio roar_exit(3)
NAME
roar_exit - let RoarAudio's sound server quit
roar_terminate - let RoarAudio's sound server quit as soon as all clients quit
SYNOPSIS
#include <roaraudio.h>
int roar_exit(struct roar_connection * con);
int roar_terminate(struct roar_connection * con, int terminate);
DESCRIPTION
Ask the sound server to quit.
roar_exit() let the server quit without waiting for any clients. All streams and client connections will be closed cleanly.
roar_terminate() will let the server quit as soon as all clients disconnects and all input streams ended. The listening socket will be
closed. This is useful in case of restarting roard.
PARAMETERS
con An open controll connection to the server.
terminate
Wait for all clients to disconnect and all streams to EOF in case of 1. In case of 0 roar_terminate() is equal to roar_exit().
RETURN VALUE
On success these calls return 0. On error, -1 is returned.
NOTES
Even when the call was successfull you have to use roar_disconnect(3) to disconnect from the server.
EXAMPLES
FIXME
SEE ALSO
roar_disconnect(3), libroar(7), RoarAudio(7).
RoarAudio May 2011 roar_exit(3)