Sponsored Content
Full Discussion: Combining data from file
Top Forums Shell Programming and Scripting Combining data from file Post 302624245 by krsnadasa on Monday 16th of April 2012 04:27:00 AM
Old 04-16-2012
Combining data from file

Hi All,

I have file f1 contains :

f1;
Code:
Server Name1
te-1212hdsfhf-12kll-56565
Server Name2
jd-1212hdsfhf-12kll-5677
Server Name3
ty-1212hdsfhf-12kll-444
....

I have to produce f2 with the output:

f2:
Code:
Server1 te-1212hdsfhf-12kll-56565
Server2 jd-1212hdsfhf-12kll-5677
Server3 ty-1212hdsfhf-12kll-444

Can we write one liner for this ?

Thanks
'Krsna!

Last edited by Franklin52; 04-16-2012 at 05:33 AM.. Reason: Please use code tags for code and data samples, thank you
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Combining information from a comma delimited file

I have a comma delimited file which also contains commas in the text. I was wondering how I can combine one whole column of that file with another file. In essence I'm trying to do an excel vlookup in UNIX to return the information from one column in the comma delimited file(containing text commas... (1 Reply)
Discussion started by: vzismann
1 Replies

2. Shell Programming and Scripting

combining 2 files with more than one match in second file

Hello, I am attempting to combine two files where the second file can have more than one match with the lookup field (node) in the first file, onto one line of the output file. Also alerting if a lookup was not found in file2 =-=-=-=-=-=-= Example of file1 node,type =-=-=-=-=-=-= bob,232... (5 Replies)
Discussion started by: johnes42
5 Replies

3. Shell Programming and Scripting

Compare two csv files by two colums and create third file combining data from them.

I've got two large csv text table files with different number of columns each. I have to compare them based on first two columns and create resulting file that would in case of matched first two columns include all values from first one and all values (except first two colums) from second one. I... (5 Replies)
Discussion started by: agb2008
5 Replies

4. UNIX for Dummies Questions & Answers

Combining lines of files to new file

Hi everybody. I have a number of files that i would like to combine. however not concatenating, but rather extract lines from the files. Example: File1 ------ File2 ------File3 ... line11 ---- line21 ---- line31 ... line12 ---- line22 ---- line32 ... line13 ... (3 Replies)
Discussion started by: kabbo
3 Replies

5. Shell Programming and Scripting

Combining header and data and send email without usage of temp file

Dear All- My requirement is as below- Header file $ cat HEADER.txt RequestId: RequestDate: Data file $ cat DATAVAL.txt 1001|2009-03-01 I need to send the combined data below as email body via mailx command ------------------ RequestId:1001 RequestDate:2009-03-01 I would like... (4 Replies)
Discussion started by: sureshg_sampat
4 Replies

6. UNIX for Dummies Questions & Answers

Help with combining the ls and 'file' commands

I have a directory of 3000 files without extensions (Solaris 5.10). I would like to iterate the file names through the 'file' command and output their mime types (most are pdf or jpg, but a very few might be psd or swf which show simply as 'data') So, I would like the output of the 'ls'... (2 Replies)
Discussion started by: pwallace
2 Replies

7. Shell Programming and Scripting

Combining 2 lines in a file into 1 line

Hi all, I have a file with lot of lines with repeating pattern. ( TABLE_NAME line followed by Total line). I would like combine these two lines into one line seperated by cama and create a new file. Is there a simple way to do this. Current Format ( just a sample 4 lines ) TABLE_NAME:... (10 Replies)
Discussion started by: MKNENI
10 Replies

8. Shell Programming and Scripting

Combining chunks of data

Hi there! Need help on some issue, I have data like this: 123 456 789 012 i need it to be like this: 123789 456012 Anyone has any idea how to do this? Thanks! Regards, Ken How to use code tags (8 Replies)
Discussion started by: kennethtls
8 Replies

9. UNIX for Dummies Questions & Answers

Need help combining txt files w/ multiple lines into csv single cell - also need data merge

:confused:Hello -- i just joined the forums. I am a complete noob -- only about 1 week into learning how to program anything... and starting with linux. I am working in Linux terminal. I have a folder with a bunch of txt files. Each file has several lines of html code. I want to combine... (2 Replies)
Discussion started by: jetsetter
2 Replies

10. Shell Programming and Scripting

Combining certain columns of multiple files into one file

Hello Unix gurus, I have a large number of files (say X) each containing two columns of data and the same number of rows. I would like to combine these files to create a unique merged file containing X columns corresponding to the second column of each file (with a bonus of having the first... (3 Replies)
Discussion started by: ksennin
3 Replies
Net::Server::Proto::UDP(3)				User Contributed Perl Documentation				Net::Server::Proto::UDP(3)

NAME
Net::Server::Proto::UDP - Net::Server UDP protocol. SYNOPSIS
See Net::Server::Proto. DESCRIPTION
Protocol module for Net::Server. This module implements the SOCK_DGRAM socket type under INET (also known as UDP). See Net::Server::Proto. PARAMETERS
The following paramaters may be specified in addition to normal command line parameters for a Net::Server. See Net::Server for more information on reading arguments. udp_recv_len Specifies the number of bytes to read from the UDP connection handle. Data will be read into $self->{'server'}->{'udp_data'}. Default is 4096. See IO::Socket::INET and recv. udp_recv_flags See recv. Default is 0. udp_broadcast Default is undef. QUICK PARAMETER LIST
Key Value Default ## UDP protocol parameters udp_recv_len d+ 4096 udp_recv_flags d+ 0 udp_broadcast bool undef INTERNAL METHODS
"object" Returns an object with parameters suitable for eventual creation of a IO::Socket::INET object listining on UDP. "connect" Called when actually binding the port. Handles default parameters before calling parent method. LICENCE
Distributed under the same terms as Net::Server perl v5.18.2 2013-01-09 Net::Server::Proto::UDP(3)
All times are GMT -4. The time now is 07:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy