Converting IP adresses from a column to a raw + add a comma between addresses
Hi all,
I have a list of IP addresses in a column in a text file name ipaddress.txt
I would like to convert ipaddress.txt to have the following thing :
I know how to do it with a spreadsheet but it would very useful for me to be able to do it in CLI.
I think I should use sed and awk commands but I haven't find a solution up to now
Your help will be very appreciated.
Regards,
Olivier
Moderator's Comments:
Please view this code tag video for how to use code tags when posting code and data.
write a shell script that accepts one or more file name as arguments and converts all of them to uppercase,provided they exist in the current directory:b::b::b: (2 Replies)
Dear All,
For example the content of data.txt file is:
1 1 23
2 1 42
3 2 52
4 2 62
5 1 77
6 1 88
7 2 99
8 1 100
Could I substitute 2 in second column with 1 using sed commad so that the data will be change as follow ?
1 1 23
2 1 42 ... (1 Reply)
Hi,
I am new to shell scripting, i have requirement can any one help me out in this regrads,
in directory i have file like invoice1.txt, invoice2.txt in each file i have fixed number of columns, 62 in number but they are randomly arranged.like
for first file invoice1.txt can have columns... (5 Replies)
Hi All Gurus,
I need to replace a pipe <|> with a comma <,> in a few columns with pipe delimited file. The column name are fixed for the replacement of comma <,>.
For below example, Col3, Col6 and Col8 are columns need to replace with comma <,> if any pipe encountered.
example:... (14 Replies)
Hi,
I'm dealing with an issue and losing a lot of hours figuring out how i would solve this.
I have an input file which looks like this:
('BLABLA +200-GRS','Serviço ','TarifaçãoServiço','wap.bla.us.0000000121',2985,0,55,' de conversão em escada','Dia','Domingos')
('BLABLA +200-GRR','Serviço... (6 Replies)
Hi all,
I have a file in which I have to insert commna between entries of 2 column and createa new file separated by commas not a columns
if input is
FHIT Adenosine Monotungstate Not Available
CS Trifluoroacetonyl Coenzyme A Not Available
Theo expected output is
... (5 Replies)
Hi,
I have pipe separated file which contains some data having comma(,) in it. I want to remove the comma(,) only from particular column without changing data in other columns.
Below is the sample data file, I want to remove the comma(,) only from 5th column.
$ cat file1
ABC | DEF, HIJ|... (6 Replies)
I want to bring values in the second column into single line for uniq value in the first column.
My input
jvm01, Web 2.0 Feature Pack Library
jvm01, IBM WebSphere JAX-RS
jvm01, Custom01 Shared Library
jvm02, Web 2.0 Feature Pack Library
jvm02, IBM WebSphere JAX-RS
jvm03, Web 2.0 Feature... (10 Replies)
Discussion started by: kchinnam
10 Replies
LEARN ABOUT DEBIAN
prips
PRIPS(1) BSD General Commands Manual PRIPS(1)NAME
prips -- print the IP addresses in a given range
SYNOPSIS
prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] start end
prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] CIDR-block
prips -h
DESCRIPTION
The prips tool can be used to print all of the IP addresses in a given range. It can enhance tools that only work on one host at a time,
e.g. whois(1).
The prips tool accepts the following command-line options:
-c Print the range in CIDR notation.
-d delim
Set the delimiter to the character with ASCII code delim where 0 <= delim <= 255.
-e <x.x.x,x.x>
Exclude ranges from the output.
-f format
Set the format of addresses (hex, dec, or dot).
-h Show summary of options.
-i incr
Set the increment to 'x'.
ENVIRONMENT
The prips tool's operation is not influenced by any environment variables.
FILES
The prips tool's operation is not influenced by any files.
EXAMPLES
Display all the addresses in a reserved subnet:
prips 192.168.32.0 192.168.32.255
The same, using CIDR notation:
prips 192.168.32/24
Display only the usable addresses in a class A reserved subnet using a space instead of a newline for a delimiter:
prips -d 32 10.0.0.1 10.255.255.255
Display every fourth address in a weird block:
prips -i 4 192.168.32.7 192.168.33.5
Determine the smallest CIDR block containing two addresses:
prips -c 192.168.32.5 192.168.32.11
DIAGNOSTICS
The prips utility exits 0 on success, and >0 if an error occurs.
SEE ALSO ipsc(1), gipsc(1)STANDARDS
No standards were harmed in the writing of the prips tool.
HISTORY
The prips tool was originally written by Daniel Kelly and later adopted by Peter Pentchev. This manual page was originally written by Juan
Alvarez for the Debian GNU/Linux system and later added to the prips distribution and converted to mdoc format by Peter Pentchev.
AUTHORS
Daniel Kelly <dan@vertekcorp.com>
Juan Alvarez <jalvarez@fluidsignal.com>
Peter Pentchev <roam@ringlet.net>
BUGS
Please report any bugs in the prips tool to its current maintainer, Peter Pentchev.
BSD March 1, 2011 BSD