Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Merging multiple lines into single line based on one column Post 302987792 by raju2016 on Friday 16th of December 2016 02:31:28 AM
Old 12-16-2016
Hi Ravinder/Rudy,

Could you please explain what exactly this AWK is doing
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk multiple lines with 3rd column onto a single line?

I have a H U G E file with over 1million entries in it. Looks something like this: USER0001|DEVICE001|VAR1 USER0001|DEVICE001|VAR2 USER0001|DEVICE001|VAR3 USER0001|DEVICE001|VAR4 USER0001|DEVICE001|VAR5 USER0001|DEVICE001|VAR6 USER0001|DEVICE002|VAR1 USER0001|DEVICE002|VAR2... (4 Replies)
Discussion started by: SoMoney
4 Replies

2. Shell Programming and Scripting

merge lines into single line based on symbol \t

The symbols are \t and \t\t (note: not tab) If the line starts with \t merge them into a single line upto symbol \t\t \t\t to end and start new line I able to join in a single line but not ending at \t\t and I completely confused help would be appreciated:b::D Input \ta tab XXXXXXXXXX \te... (5 Replies)
Discussion started by: repinementer
5 Replies

3. Shell Programming and Scripting

Split single file into multiple files based on the number in the column

Dear All, I would like to split a file of the following format into multiple files based on the number in the 6th column (numbers 1, 2, 3...): ATOM 1 N GLY A 1 -3.198 27.537 -5.958 1.00 0.00 N ATOM 2 CA GLY A 1 -2.199 28.399 -6.617 1.00 0.00 ... (3 Replies)
Discussion started by: tomasl
3 Replies

4. Shell Programming and Scripting

Multiple lines in a single column to be merged as a single line for a record

Hi, I have a requirement with, No~Dt~Notes 1~2011/08/1~"aaa bbb ccc ddd eee fff ggg hhh" Single column alone got splitted into multiple lines. I require the output as No~Dt~Notes 1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh" mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies

5. Shell Programming and Scripting

Awk multiple lines with 4th column on to a single line

This is related to one of my previous post.. I have huge file currently I am using loop to read file and checking each line to build this single record, its taking much much time to parse those records.. I thought there should be a way to do this in awk or sed. I found this code in this forum... (7 Replies)
Discussion started by: Vasan
7 Replies

6. Shell Programming and Scripting

merging multiple lines into single line

Hi, 1. Each message starts with date 2. There is blank line between each message 3. Each message does not contain same number of lines. Any help in merging multiple lines in each message to a single line is much appreciated. AIX: Korn Shell Error log file looks like below. ... (5 Replies)
Discussion started by: bala123
5 Replies

7. UNIX for Dummies Questions & Answers

Merging lines based on one column

Hi, I have a file which I'd like to merge lines based on duplicates in one column while keeping the info for other columns. Let me simplify it by an example: File ESR1 ANASTROZOLE NA FDA_approved ESR1 CISPLATIN NA FDA_approved ESR1 DANAZOL agonist NA ESR1 EXEMESTANE NA FDA_approved... (3 Replies)
Discussion started by: JJ001
3 Replies

8. Shell Programming and Scripting

Returning multiple outputs of a single line based on previous repeated lines

Hello, I am trying to return a time multiple times from a file that has varying output just before the time instance, i.e. cat jumped cat jumped cat jumped time = 1.1 cat jumped cat jumped time = 1.2 cat jumped cat jumped time = 1.3 In this case i would like to output a time.txt... (6 Replies)
Discussion started by: ryddner
6 Replies

9. Shell Programming and Scripting

Merging two tables including multiple ocurrence of column identifiers and unique lines

I would like to merge two tables based on column 1: File 1: 1 today 1 green 2 tomorrow 3 red File 2: 1 a lot 1 sometimes 2 at work 2 at home 2 sometimes 3 new 4 a lot 5 sometimes 6 at work (4 Replies)
Discussion started by: BSP
4 Replies

10. UNIX for Beginners Questions & Answers

Multiple lines to single line

I have code as below # create temporary table `temp4277`(key(waybill_no)) select waybill_no,concat_ws('',card_type,card_series_no) cardinfo from rfid_temp_ticket where waybill_no='4277' group by... (4 Replies)
Discussion started by: kaushik02018
4 Replies
BIOSDEVNAME(1)						      General Commands Manual						    BIOSDEVNAME(1)

NAME
biosdevname - give BIOS-given name of a device SYNOPSIS
biosdevname [options] [args]... DESCRIPTION
biosdevname takes a kernel device name as an argument, and returns the BIOS-given name it "should" be. OPTIONS
-i, --interface Treat [args] as ethernet devs -d, --debug Enable debugging -p, --policy [physical|all_ethN] -P, --prefix [string] string use for embedded NICs in the physical policy (default=em) -x, --nopirq Do not use $PIR table for mapping PCI device to slot. Some BIOS have incorrect values. -s, --smbios [x.y] Require minimum SMBIOS version x.y POLICIES
The physical policy is the current default. However, when invoking biosdevname in udev rules, one should always specify the policy you want, as the default has changed over time. The physical policy uses the following scheme: em<port>[_<virtual instance>] for embedded NICs p<slot>p<port>[_<virtual instance>] for cards in PCI slots The all_ethN policy makes a best guess at what the device order should be, with embedded devices first, PCI cards in ascending slot order, and ports in ascending PCI bus/device/function order breadth-first. However, this policy does not work if your PCI devices are hot-plugged or hot-pluggable, including the virtual functions on an SR-IOV device. In a hot-plug scenario, each separate udev instance will be invoked in parallel, while the device tree is still being populated with new devices. Each udev instance will see a different PCI tree, and thus cannot provide consistent enumeration. Use of this policy should be limited to only scenarios where all PCI devices are present at boot (cold-plug). EXIT CODES
Returns 0 on success, with BIOS-suggested name printed to stdout. Returns 1 on provided device name lookup failure. Returns 2 if system BIOS does not provide naming information. biosdevname requires system BIOS to provide naming information, either via SMBIOS or sysfs files. Returns 3 if not run as root but requires root privileges. Returns 4 if running in a virtual machine. SEE ALSO
http://linux.dell.com/wiki/index.php/Oss/libnetdevname http://linux.dell.com/files/biosdevname/ git://linux.dell.com/biosdevname.git RELATED PROGRAMS
The dmidecode package contains two tools useful for debugging BIOS features that biosdevname uses, specifically dmidecode to read the SMBIOS Type 9 and Type 41 tables, and biosdecode to read the PCI IRQ Routing Table. Please include the output of each of these programs in any bug reports. AUTHOR
biosdevname was written by Matt Domsch <Matt_Domsch@dell.com> This manual page was written by Rudy Gevaert <Rudy.Gevaert@UGent.be>, for the Debian project (but may be used by others). Nov 28, 2010 BIOSDEVNAME(1)
All times are GMT -4. The time now is 05:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy