Sponsored Content
Full Discussion: Eliminate double void line
Top Forums Shell Programming and Scripting Eliminate double void line Post 302481639 by mjomba on Saturday 18th of December 2010 05:48:06 PM
Old 12-18-2010
Eliminate double void line

Hi,

I need to eliminate each second void line in a text file.
Code:
novus
MILLENNIO
ineo


frater
in
episcopatus
,


presbyter
et
diacon|diaconus
,


religiosus
vir|virum|virus|vis
et
mulier
,

So to have ONLY ONE void line separating "sentences":
Code:
novus
MILLENNIO
ineo

frater
in
episcopatus
,

presbyter
et
diacon|diaconus
,

religiosus
vir|virum|virus|vis
et
mulier
,

Is it possible to have a script using "perl" or "sed"?
Thank you for any help!
mjomba
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sorting the Void File in CSH

First and foremost, this is not a homework for your information. I'm just new to using c-shell programming and I just wanted to make my life easier @ work. Say, the file contains the following: ID FILE NO. SL VP 1 1 22 33 1 2 ... (3 Replies)
Discussion started by: ilak1008
3 Replies

2. Shell Programming and Scripting

How to Eliminate first line of multiple files

hi gurus ,, I have multiple files with same file pattern..in a particular directory for ex: file20061101.trf file20061102.trf file20061103.trf Each of the file has a header as column names.. My questions is how can i eliminate the first row of each of these... (11 Replies)
Discussion started by: sish78
11 Replies

3. Programming

How to return void function pointer

Hello all im trying to build function that will return void function pointer what is mean is ( not working ) the main function void * myClass::getFunction(int type){ if(type==1) return &myClass::Test1; if(type==2) return &myClass::Test2; } void myClass::Test1(){... (1 Reply)
Discussion started by: umen
1 Replies

4. Programming

What is the difference between f(...), f(void) and f()

What is the difference between f(...) , f(void),f() I know that f(void) doesn't take any parameters, but what about f() and f(...) Does the last call of function even exists? (2 Replies)
Discussion started by: purplelightspar
2 Replies

5. UNIX for Dummies Questions & Answers

void (char *asd)

void asdf(char *asd) is this thing a pointer? (1 Reply)
Discussion started by: khestoi
1 Replies

6. Programming

functions that manipulate void pointers

I have two or more linked lists that have the same names for their "next". For example, struct server_t { sockaddr_in * sin; server_t * next_; } struct player_t { char name; player_t * next_; } How can I get a function to take in either type and manipulate the pointers? I... (3 Replies)
Discussion started by: pyramation
3 Replies

7. Programming

void pointer

hi guys! Is there such a thing as double void pointer dynamic allocation? And if so is it something like this? int n; void** a; a=malloc(n*sizeof(void*)); (12 Replies)
Discussion started by: vlm
12 Replies

8. Shell Programming and Scripting

Deleting double quoted string from a line when line number is variable

I need to remove double quoted strings from specific lines in a file. The specific line numbers are a variable. For example, line 5 of the file contains A B C "string" I want to remove "string". The following sed command works: sed '5 s/\"*\"//' $file If there are multiple... (2 Replies)
Discussion started by: rennatsb
2 Replies

9. Programming

Malloc to void pointer fails

I have a function to which I will pass a struct ID and it will return me a string. I will pass a pointer to store the name string and that pointer will be allocated memory by the function called. int ConvertIDToName(void *id, void *name, size_t *size) { int status = 0; ... (5 Replies)
Discussion started by: rupeshkp728
5 Replies
MAKETEXT(1p)						User Contributed Perl Documentation					      MAKETEXT(1p)

NAME
maketext - translate and make messages SYNOPSIS
maketext [OPTION] [--domain=TEXTDOMAIN] MSGKEY [PARAM...] maketext [OPTION] -s MSGID [PARAM...] DESCRIPTION
The "maketext" script translates a natural language message into the user's language, by looking up the translation in a message MO file, and process the plural transformation with Maketext. The "maketext" script is a command-line interface to Locale::Maketext::Gettext(3) (and Locale::Maketext(3)). It can be used in shell scripts, etc, to translate, maketext and return the result. By this way, it enables Maketext to be integrated into other programming languages/systems, like bash/csh, python, PHP, C, etc. It works like the command-line program gettext. For example: % maketext -s "[*,_1,virus was,viruses were] found in [*,_2,file,files]." 0 1 0 viruses were found in 1 file. % maketext -s "[*,_1,virus was,viruses were] found in [*,_2,file,files]." 1 3 1 virus was found in 3 files. % OPTIONS
-d,--domain=TEXTDOMAIN Retrieve translated messages from TEXTDOMAIN. -s Adds a new line to the end of the output so that it behaves like the `echo' or the `gettext' command. -h,--help Display the help messages. -V,--version Display version information and exit. MSGKEY The original text used to look up translated text. PARAM... Parameters to Maketext for the plural and other text functions. ENVIRONMENT
TEXTDOMAIN TEXTDOMAIN is used to determine the text domain when the -d parameter is not given. TEXTDOMAINDIR TEXTDOMAINDIR is used to search the message catelog/MO file if it does not reside in the system locale directories. NOTES
Maketext language function override, like "quant" or "numerate", is not available here. Suggestions are welcome. The current system locale directory search order is: /usr/share/locale, /usr/lib/locale, /usr/local/share/locale, /usr/local/lib/locale. Suggestions are welcome. BUGS
Report bugs to imacat <imacat@mail.imacat.idv.tw> SEE ALSO
Locale::Maketext(3), Locale::Maketext::TPJ13(3), Locale::Maketext::Gettext(3), Locale::Maketext::Gettext::Functions(3), bindtextdomain(3), textdomain(3). Also, please refer to the official GNU gettext manual at <http://www.gnu.org/software/gettext/manual/>. AUTHOR
imacat <imacat@mail.imacat.idv.tw> COPYRIGHT
Copyright (c) 2003-2007 imacat. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2007-03-28 MAKETEXT(1p)
All times are GMT -4. The time now is 08:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy