Sponsored Content
Top Forums Shell Programming and Scripting Sort by id value in every two rows Post 303035780 by RudiC on Monday 3rd of June 2019 05:09:41 AM
Old 06-03-2019
Try also
Code:
$ paste -sd"\t\n" file | sort -nt\" -k2 | tr $'\t' $'\n'
#INFO id="18 london" logo="http://lx.yy.zz
http://11.22.77
#INFO id="21 michigan" logo="http://mx.yy.zz
http://11.22.55
#INFO id="133 texas" logo="http://tx.yy.zz
http://11.22.48
#INFO id="299 paris" logo="http://px.yy.zz
http://11.22.00

These 4 Users Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sort, group rows

I wrote script in bash which generates this report: User1,admin,rep,User2,shell,path1,x1,r1 User2,admin,rep,User7,shell,path1,x1,r1 User3,admin,rep,User4,shell,path1,x1,r1 User4,admin,rep,User3,shell,path1,x1,r1 User5,admin,rep,User1,shell,path1,x1,r1 User6,admin,rep,User5,shell,path1,x1,r1... (6 Replies)
Discussion started by: patrykxes
6 Replies

2. Shell Programming and Scripting

Deleting specific rows in large files having rows greater than 100000

Hi Guys, I need help in modifying a large text file containing more than 1-2 lakh rows of data using unix commands. I am quite new to the unix language the text file contains data in a pipe delimited format sdfsdfs sdfsdfsd START_ROW sdfsd|sdfsdfsd|sdfsdfasdf|sdfsadf|sdfasdf... (9 Replies)
Discussion started by: manish2009
9 Replies

3. Shell Programming and Scripting

Sort the multi column rows

abc xyz - - - - - - - - - - - How to sort the second column in ascending order. (2 Replies)
Discussion started by: sandy1028
2 Replies

4. Shell Programming and Scripting

Split single rows to multiple rows ..

Hi pls help me out to short out this problem rm PAB113_011.out rm: PAB113_011.out: override protection 644 (yes/no)? n If i give y it remove the file. But i added the rm command as a part of ksh file and i tried to remove the file. Its not removing and the the file prompting as... (7 Replies)
Discussion started by: sri_aue
7 Replies

5. UNIX for Advanced & Expert Users

Script to sort the files and append the extension .sort to the sorted version of the file

Hello all - I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies

6. UNIX for Dummies Questions & Answers

merging rows into new file based on rows and first column

I have 2 files, file01= 7 columns, row unknown (but few) file02= 7 columns, row unknown (but many) now I want to create an output with the first field that is shared in both of them and then subtract the results from the rest of the fields and print there e.g. file 01 James|0|50|25|10|50|30... (1 Reply)
Discussion started by: A-V
1 Replies

7. Shell Programming and Scripting

Sort help: How to sort collected 'file list' by date stamp :

Hi Experts, I have a filelist collected from another server , now want to sort the output using date/time stamp filed. - Filed 6, 7,8 are showing the date/time/stamp. Here is the input: #---------------------------------------------------------------------- -rw------- 1 root ... (3 Replies)
Discussion started by: rveri
3 Replies

8. UNIX for Dummies Questions & Answers

Converting Columns To Rows Sort Of

Hi I'm a UNIX awk and sed novice at best. I'm trying to creat a .csv file so it can be graphed in Excel. Tried various xargs, awk, sed and paste but just can't seem to get the data to line up. Not sure if this is beyond for a question in these forums. Any help would greatly be appreciated. Have... (4 Replies)
Discussion started by: jimmyf
4 Replies

9. Shell Programming and Scripting

Moving or copying first rows and last rows into another file

Hi I would like to move the first 1000 rows of my file into an output file and then move the last 1000 rows into another output file. Any help would be great Thanks (6 Replies)
Discussion started by: kylle345
6 Replies

10. UNIX for Dummies Questions & Answers

Sort tab delimited file according to which rows have missing values

Hello! I have a tab delimited file with values in three columns. Some values occur in all three columns, other values are present in only one or two columns. I would like to sort the file so that rows with no missing values come first, rows with one missing values come next, and rows with two... (9 Replies)
Discussion started by: MBarrett1213
9 Replies
BEASTIE.4TH(8)						    BSD System Manager's Manual 					    BEASTIE.4TH(8)

NAME
beastie.4th -- FreeBSD ASCII art boot module DESCRIPTION
The file that goes by the name of beastie.4th is a set of commands designed to draw the ASCII art FreeBSD mascot -- known simply as beastie -- to the right of the boot loader menu. The commands of beastie.4th by themselves are not enough for most uses. Please refer to the exam- ples below for the most common situations, and to loader(8) for additional commands. Before using any of the commands provided in beastie.4th, it must be included through the command: include beastie.4th This line is present in the default /boot/loader.rc file, so it is not needed (and should not be re-issued) in a normal setup. The commands provided by it are: draw-beastie Draws the FreeBSD logo. The logo that is drawn is configured by setting the loader_logo variable in loader.conf(5) to one of ``beastie'', ``beastiebw'', ``fbsdbw'', ``orb'', and ``orbbw'' (the default). The position of the logo can be configured by setting the loader_logo_x and loader_logo_y variables in loader.conf(5). The default values are 46 (x) and 4 (y). clear-beastie Clears the screen of beastie. beastie-start Initializes the interactive boot loader menu. The loader_delay variable can be configured in loader.conf(5) to the number of seconds you would like to delay loading the boot menu. During the delay the user can press Ctrl-C to fall back to autoboot or ENTER to proceed. The default behavior is to not delay. The environment variables that effect its behavior are: loader_logo Selects the desired logo in the beastie boot menu. Possible values are: ``fbsdbw'', ``beastie'', ``beastiebw'', ``orb'', ``orbbw'' (default), and ``none''. loader_logo_x Sets the desired column position of the logo. Default is 46. loader_logo_y Sets the desired row position of the logo. Default is 4. beastie_disable If set to ``YES'', the beastie boot menu will be skipped. The beastie boot menu is always skipped if booting UEFI or running non-x86 hardware. loader_delay If set to a number higher than zero, introduces a delay before starting the beastie boot menu. During the delay the user can press either Ctrl-C to skip the menu or ENTER to proceed to the menu. The default is to not delay when loading the menu. FILES
/boot/loader The loader(8). /boot/beastie.4th beastie.4th itself. /boot/loader.rc loader(8) bootstrapping script. EXAMPLES
Standard i386 /boot/loader.rc: include /boot/beastie.4th beastie-start Set a different logo in loader.conf(5): loader_logo="beastie" SEE ALSO
loader.conf(5), loader(8), loader.4th(8) HISTORY
The beastie.4th set of commands first appeared in FreeBSD 5.1. AUTHORS
The beastie.4th set of commands was written by Scott Long <scottl@FreeBSD.org>, Aleksander Fafula <alex@fafula.com> and Devin Teske <dteske@FreeBSD.org>. BSD
April 27, 2014 BSD
All times are GMT -4. The time now is 03:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy