Sponsored Content
Top Forums Shell Programming and Scripting Remove lines if some data is the same: Centos5 / bash Post 302676397 by oly_r on Tuesday 24th of July 2012 01:28:21 PM
Old 07-24-2012
The files end up having only one line that contains any one ip. It sounds confusing to me an i'm the one asking for help. If the IP is associated with a domain already i don't want it listed again.

1 IP file

Any.com:192.168.10.100:
Where.edu:192.168.10.200:


2 IP file

Who.com: 192.168.10.300:192.168.10.200:
What.gov:10.0.0.150:192.168.10.300:
Where.biz:192.168.10.200:10.10.0.10:
When.tv:192.168.10.10:192.168.10.11:

4 IP file

Kirk.ufp:10.0.100.100:10.0.200.100:10.0.200.200:10.0.100.200:
Spock.vsa:10.100.100.100:10.100.100.200:10.100.200.200:10.0.100.100
Mccoy.ama:10.100.200.200:192.168.200.200:192.168.100.200:192.168.100.201
 

10 More Discussions You Might Find Interesting

1. Programming

pthread_mutex_trylock() overwrites global variable on CentOS5

Hi all, I am new to linux and got problem with pthread_mutex_trylock(). I have used mutex in my code. When I try to call pthread_mutex_trylock() on RECURSIVE type of mutex it overwrites adjacent memory location (that is global variable of type structure say x, memory allocated using malloc()). ... (5 Replies)
Discussion started by: liveshell
5 Replies

2. Shell Programming and Scripting

remove blank lines and merge lines in shell

Hi, I'm not a expert in shell programming, so i've come here to take help from u gurus. I'm trying to tailor a csv file that i got to make it work for the LOAD FROM command. I've a datatable csv of the below format - --in file format xx,xx,xx ,xx , , , , ,,xx, xxxx,, ,, xxx,... (11 Replies)
Discussion started by: dvah
11 Replies

3. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

4. Red Hat

Adding EML to CentOS5.5

Hi! I've just installed CentOS 5.5 on HP Proliant DL380G5 with two FC HBA and now I'm struggling with adding HP EML103e connected through two Brocade SAN switches. Tape library has two tape drives, each in different fabric. Robotics connected to both fabrics. Zoning is ok - OS sees drives'... (0 Replies)
Discussion started by: Sapfeer
0 Replies

5. Shell Programming and Scripting

how to write a function to get data under spesific lines ? using bash

I have a text file called ( bvhz ) contains data : Subscriber Data ID = 2 Customer = 99 Data ID = 4 Customer = cf99 Data ID = 5 Customer = c99 Data ID = 11 Customer = 9n9 Subscriber Data ID = 1 Customer = 9ds9 Data ID = 2 Customer = 9sad9 Data ID = 3 Customer = f99... (1 Reply)
Discussion started by: teefa
1 Replies

6. Shell Programming and Scripting

Converting variable space width data into CSV data in bash

Hi All, I was wondering how I can convert each line in an input file where fields are separated by variable width spaces into a CSV file. Below is the scenario what I am looking for. My Input data in inputfile.txt 19 15657 15685 Sr2dReader 107.88 105.51... (4 Replies)
Discussion started by: vharsha
4 Replies

7. Shell Programming and Scripting

Parsing XML (and insert data) then output data (bash / Solaris)

Hi folks I have a script I wrote that basically parses a bunch of config and xml files works out were to add in the new content then spits out the data into a new file. It all works - apart from the xml and config file format in the new file with XML files the original XML (that ends up in... (2 Replies)
Discussion started by: dfinch
2 Replies

8. Hardware

Bumblebee for CentOS5/RHEL5

I have a laptop running CentOS 5.9 with switchable/hybrid graphics (Intel integrated and Nvidia). For now, have managed to successfully install Nvidia driver using NVIDIA-Linux-x86_64-331.20.run file from Nvidia website, but failed to start xserver. To use both adapters I need to install... (0 Replies)
Discussion started by: cooltoad
0 Replies

9. Shell Programming and Scripting

awk to remove lines that do not start with digit and combine line or lines

I have been searching and trying to come up with an awk that will perform the following on a converted text file (original is a pdf). 1. Since the first two lines are (begin with) text they are removed 2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. UNIX for Beginners Questions & Answers

Bash to remove find and remove specific extension

The bash below executes and does find all the .bam files in each R_2019 folder. However set -x shows that the .bam extension only gets removed from one .bam file in each folder (appears to be the last in each). Why is it not removing the extension from each (this is $SAMPLE)? Thank you :). set... (4 Replies)
Discussion started by: cmccabe
4 Replies
ULIMIT(3)						     Linux Programmer's Manual							 ULIMIT(3)

NAME
ulimit - get and set user limits SYNOPSIS
#include <ulimit.h> long ulimit(int cmd, long newlimit); DESCRIPTION
Warning: This routine is obsolete. Use getrlimit(2), setrlimit(2), and sysconf(3) instead. For the shell command ulimit(), see bash(1). The ulimit() call will get or set some limit for the calling process. The cmd argument can have one of the following values. UL_GETFSIZE Return the limit on the size of a file, in units of 512 bytes. UL_SETFSIZE Set the limit on the size of a file. 3 (Not implemented for Linux.) Return the maximum possible address of the data segment. 4 (Implemented but no symbolic constant provided.) Return the maximum number of files that the calling process can open. RETURN VALUE
On success, ulimit() returns a nonnegative value. On error, -1 is returned, and errno is set appropriately. ERRORS
EPERM A unprivileged process tried to increase a limit. CONFORMING TO
SVr4, POSIX.1-2001. POSIX.1-2008 marks ulimit() as obsolete. SEE ALSO
bash(1), getrlimit(2), setrlimit(2), sysconf(3) COLOPHON
This page is part of release 3.44 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-08-06 ULIMIT(3)
All times are GMT -4. The time now is 03:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy