Sponsored Content
Full Discussion: Eliminar lineas con ******
Top Forums Shell Programming and Scripting Eliminar lineas con ****** Post 302415687 by kekaes on Friday 23rd of April 2010 06:31:37 AM
Old 04-23-2010
Eliminar lineas con ******

Hola. Tengo un problema. En un archivo tengo distintos campos y en alguno de ellos y en alguna linea me aparecen ******.

ej:

hola 0.1 ****** 85
adios 1.2 9650 23
gracias 2 ****** 54
bye 87 5666 89
hi 12 544 90

Me gustaría eliminar las líneas que contienen los asteriscos, y que la salida fuera:

adios 1.2 9650 23
bye 87 5666 89
hi 12 544 90

He intentado sed /******/d file pero no me funciona. Alguna idea? Gracias
 

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

BT Internet con - a warning

A warning... I used to be a BT Broadband customer, but changed to Sky in February. BT withdrew the service with the cutover and that was that. But I've just checked my credit card statements, and they've billed me for the service again for the past two months! (2 Replies)
Discussion started by: prowla
2 Replies

2. Shell Programming and Scripting

Comparar 2 archivos y agregas lineas faltantes

Hi I have 2 files where i save the IP adress of many printers that work on UNIX, one of these files, which is the 'Main File', is on a server call PROD, and the other one is on a different server call Al. What I want, is to make a comparison between the 2 files, and then, copy the IPs that... (4 Replies)
Discussion started by: Athlon1
4 Replies

3. Shell Programming and Scripting

Shell con sqlldr

Hola, Genere un proceso en proC que me inserta registros a oracle, el cual ejecuto desde un shell en Unix. Por otro lado tengo un sqlldr que me hace el trabajo en un 25 % de tiempo que mi proceso en C. Se que puedo ejecutar mi sqlldr desde un shell, pero no se como hacer, alguien tiene un... (0 Replies)
Discussion started by: marcoinxs
0 Replies

4. Shell Programming and Scripting

Ayuda con SED

Saludos Necesito utilizar SED para crear una herramienta que me facilite el trabajo. El objetivo es filtrar información de un log para que me muestre solamente los registros que contengan una determinada cadena. El formato de cada registro es el siguiente: a) un registro puede contener varias... (1 Reply)
Discussion started by: antuan
1 Replies

5. Linux

/etc/con.daily/prelink aborted

Since a couple of days i get the following message: /etc/cron.daily/prelink: /etc/cron.daily/prelink: line 47: 31091 Aborted /usr/sbin/prelink -av $PRELINK_OPTS >>/var/log/prelink.log 2>&1 Please find attached the prelink.log Can anybody help me out please? Thx a... (2 Replies)
Discussion started by: Jumping
2 Replies

6. Shell Programming and Scripting

Almacenar variables con AWK

Hola a todos, soy nuevo en el foro y también en programación Shell Script. El problema es el siguiente: necesito hacer un Script que busque todos los procesos del sistema y me muestre de forma jerárquica la cantidad de Bytes que ocupa cada una de las regiones del mapa de memoria de cada proceso. ... (1 Reply)
Discussion started by: cougar_rea
1 Replies

7. Shell Programming and Scripting

Dividir fichero en numero de lineas

Hola, Estoy haciendo un script y queria de un archivo por ejemplo de 650 lineas, recortarlo y hacer archivos mas pequeños de 100 lineas, y que me salieran 7 archivos, por poner un ejemplo. No tengo ni idea de hacerlo la verdad....xD Un saludo y gracias! (3 Replies)
Discussion started by: uri_crack
3 Replies

8. Shell Programming and Scripting

Eliminar lineas con SED en Bash?

Hola a todos les cuento que estoy haciendo un programa en bash y queria saber como puedo hacer para borrar lineas de un documento de las palabras que NO terminen en S con SED, es decir, mostrar solamente las que terminan con la letra S. les cuento que probe con: sed -e /$.*/d "$archivo" |... (1 Reply)
Discussion started by: adiegorpc
1 Replies

9. Shell Programming and Scripting

Comando seleccionar(selecionar) lineas(Linhas)

Hola, he empezado la carrera de informática y tengo que hacer uno ejercicios con Cygwin ( mismos comandos que UNIX ). Y en el ejercicio me dice que tengo que abrir un archivo .csv y que selecione las lineas en que en la tercera columna el valor sea 4 y en la cuarta columna el valor sea 2, he... (1 Reply)
Discussion started by: mcanhizares
1 Replies

10. Red Hat

RHEL 4 Server con't Started....

Hi Friends, My Server is con't stated..it shows the below error.. Red hat exterprise Linux As Release 4(nahat) kernel 2.6.9-5.ELsmp on an i686 INIT : id "x" respawing too fast :disabled for 5 minutes... Please help help Thanks, Srinivas (1 Reply)
Discussion started by: srinivas814
1 Replies
ATEXIT(3)						     Linux Programmer's Manual							 ATEXIT(3)

NAME
atexit - register a function to be called at normal process termination SYNOPSIS
#include <stdlib.h> int atexit(void (*function)(void)); DESCRIPTION
The atexit() function registers the given function to be called at normal process termination, either via exit(3) or via return from the program's main(). Functions so registered are called in the reverse order of their registration; no arguments are passed. The same function may be registered multiple times: it is called once for each registration. POSIX.1-2001 requires that an implementation allow at least ATEXIT_MAX (32) such functions to be registered. The actual limit supported by an implementation can be obtained using sysconf(3). When a child process is created via fork(2), it inherits copies of its parent's registrations. Upon a successful call to one of the exec(3) functions, all registrations are removed. RETURN VALUE
The atexit() function returns the value 0 if successful; otherwise it returns a nonzero value. CONFORMING TO
SVr4, 4.3BSD, C89, C99, POSIX.1-2001. NOTES
Functions registered using atexit() (and on_exit(3)) are not called if a process terminates abnormally because of the delivery of a signal. If one of the functions registered functions calls _exit(2), then any remaining functions are not invoked, and the other process termina- tion steps performed by exit(3) are not performed. POSIX.1-2001 says that the result of calling exit(3) more than once (i.e., calling exit(3) within a function registered using atexit(3)) is undefined. On some systems (but not Linux), this can result in an infinite recursion; portable programs should not invoke exit(3) inside a function registered using atexit(3). The atexit() and on_exit(3) functions register functions on the same list: at normal process termination, the registered functions are invoked in reverse order of their registration by these two functions. POSIX.1-2001 says that the result is undefined if longjmp(3) is used to terminate execution of one of the functions registered atexit(). Linux Notes Since glibc 2.2.3, atexit() (and on_exit(3)) can be used within a shared library to establish functions that are called when the shared library is unloaded. EXAMPLE
#include <stdio.h> #include <stdlib.h> #include <unistd.h> void bye(void) { printf("That was all, folks "); } int main(void) { long a; int i; a = sysconf(_SC_ATEXIT_MAX); printf("ATEXIT_MAX = %ld ", a); i = atexit(bye); if (i != 0) { fprintf(stderr, "cannot set exit function "); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); } SEE ALSO
_exit(2), exit(3), on_exit(3) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-12-05 ATEXIT(3)
All times are GMT -4. The time now is 07:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy