Sponsored Content
Top Forums Shell Programming and Scripting sort and split file by 2 cols (1 col after the other) Post 302338486 by Ghetz on Tuesday 28th of July 2009 04:32:45 AM
Old 07-28-2009
Thanks danmero, your last solution is even better.

Sorry I didn't make myself clear initially.

Now one last request:

If I enter values for the 4th and 5th columns on the command line, how can I extract the corresponding files? Example if I enter the following:
Code:
4th column = 0.000000 , 55.000000, 100.000000
5th column = 1

How do I extract /select the corresponding
Code:
0.000000 1.txt, 55.000000 1.txt, 100.000000 1.txt

files?

Thanks again.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

join cols from multi files into one file

Hi Fields in Files 1,2,3,4 are pipe"|" separated. Say I want to grep col1 from File1 col3 from File2 col4 from File3 and print to File4 in the following order: col3|col1|col4 what is the best way of doing this? Thanks (2 Replies)
Discussion started by: vbshuru
2 Replies

2. Shell Programming and Scripting

Sort & Split records in a file

Hi, I am new to scripting. I need a script to sort and the records in a file and then split them into different files. For example, the file is: H1...................... H2...................... D2.................... D2.................... H1........................... (15 Replies)
Discussion started by: Sunitha_edi82
15 Replies

3. Shell Programming and Scripting

How to find number of Cols in a file ?

Hi I have a requirement wherein the file is comma separated. Each records seems to have different number of columns, how I can detect like a row index wise, how many columns are present ? Thanks in advance. (2 Replies)
Discussion started by: videsh77
2 Replies

4. Ubuntu

Match col 1 of File 1 with col 1 File 2 and create a 3rd file

Hello, I have a 1.6 GB file that I would like to modify by matching some ids in col1 with the ids in col 1 of file2.txt and save the results into a 3rd file. For example: File 1 has 1411 rows, I ignore how many columns it has (thousands) File 2 has 311 rows, 1 column Would like to... (7 Replies)
Discussion started by: sogi
7 Replies

5. UNIX for Advanced & Expert Users

Print line based on highest value of col (B) and repetion of values in col (A)

Hello everyone, I am writing a script to process data from the ATP world tour. I have a file which contains: t=540 y=2011 r=1 p=N409 t=540 y=2011 r=2 p=N409 t=540 y=2011 r=3 p=N409 t=540 y=2011 r=4 p=N409 t=520 y=2011 r=1 p=N409 t=520 y=2011 r=2 p=N409 t=520 y=2011 r=3 p=N409 The... (4 Replies)
Discussion started by: imahmoud
4 Replies

6. Shell Programming and Scripting

how to Insert values in multiple lines(records) within a pipe delimited text file in specific cols

this is Korn shell unix. The scenario is I have a pipe delimited text file which needs to be customized. say for example,I have a pipe delimited text file with 15 columns(| delimited) and 200 rows. currently the 11th and 12th column has null values for all the records(there are other null columns... (4 Replies)
Discussion started by: vasan2815
4 Replies

7. Shell Programming and Scripting

Printing from col x to end of line, except last col

Hello, I have some tab delimited data and I need to move the last col. I could hard code it, awk '{ print $1,$NF,$2,$3,$4,etc }' infile > outfile but it would be nice to know the syntax to print a range cols. I know in cut you can do, cut -f 1,4-8,11- to print fields 1,... (8 Replies)
Discussion started by: LMHmedchem
8 Replies

8. Shell Programming and Scripting

Modifying col values based on another col

Hi, Please help with this. I have several excel files (with and .xlsx format) with 10-15 columns each. They all have the same type of data but the columns are not ordered in the same way. Here is a 3 column example. What I want to do add the alphabet from column 2 to column 3, provided... (9 Replies)
Discussion started by: newbie83
9 Replies

9. Shell Programming and Scripting

Sort and Split file with header and custom name

Hi, I am using SUN SOLARIS (SunOS sun4v sparc SUNW, T5240). I have a huge data file with header and trailer. This file gets used into an ETL process. ETL skips the header record (which is the first record of the file) and loads the rest of the record. The file can be delimited (comma,... (5 Replies)
Discussion started by: Saanvi1
5 Replies

10. UNIX for Beginners Questions & Answers

Sort files to the split second

I need a similar sort, I need to sort the directory by time, but time needs to be to the second or smaller. Using ls -lt but that is only to the minute. (3 Replies)
Discussion started by: mwlaursen
3 Replies
DWM(1)							      General Commands Manual							    DWM(1)

NAME
dwm - dynamic window manager SYNOPSIS
dwm [-v] DESCRIPTION
dwm is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts. Either layout can be applied dynamically, optimising the environment for the application in use and the task performed. In tiled layouts windows are managed in a master and stacking area. The master area contains the window which currently needs most atten- tion, whereas the stacking area contains all other windows. In monocle layout all windows are maximised to the screen size. In floating layout windows can be resized and moved freely. Dialog windows are always managed floating, regardless of the layout applied. Windows are grouped by tags. Each window can be tagged with one or multiple tags. Selecting certain tags displays all windows with these tags. Each screen contains a small status bar which displays all available tags, the layout, the title of the focused window, and the text read from the root window name property, if the screen is focused. A floating window is indicated with an empty square and a maximised floating window is indicated with a filled square before the windows title. The selected tags are indicated with a different color. The tags of the focused window are indicated with a filled square in the top left corner. The tags which are applied to one or more windows are indicated with an empty square in the top left corner. dwm draws a small border around windows to indicate the focus state. OPTIONS
-v prints version information to standard output, then exits. USAGE
Status bar X root window name is read and displayed in the status text area. It can be set with the xsetroot(1) command. Button1 click on a tag label to display all windows with that tag, click on the layout label toggles between tiled and floating layout. Button3 click on a tag label adds/removes all windows with that tag to/from the view. Mod1-Button1 click on a tag label applies that tag to the focused window. Mod1-Button3 click on a tag label adds/removes that tag to/from the focused window. Keyboard commands Mod1-Shift-Return Start uxterm(1). Mod1-, Focus previous screen, if any. Mod1-. Focus next screen, if any. Mod1-Shift-, Send focused window to previous screen, if any. Mod1-Shift-. Send focused window to next screen, if any. Mod1-b Toggles bar on and off. Mod1-t Sets tiled layout. Mod1-f Sets floating layout. Mod1-m Sets monocle layout. Mod1-space Toggles between current and previous layout. Mod1-j Focus next window. Mod1-k Focus previous window. Mod1-i Increase clients in master area. Mod1-d Decrease clients in master area. Mod1-l Increase master area size. Mod1-h Decrease master area size. Mod1-Return Zooms/cycles focused window to/from master area (tiled layouts only). Mod1-Shift-c Close focused window. Mod1-Shift-space Toggle focused window between tiled and floating state. Mod1-Tab Toggles to the previously selected tags. Mod1-Shift-[1..n] Apply nth tag to focused window. Mod1-Shift-0 Apply all tags to focused window. Mod1-Control-Shift-[1..n] Add/remove nth tag to/from focused window. Mod1-[1..n] View all windows with nth tag. Mod1-0 View all windows with any tag. Mod1-Control-[1..n] Add/remove all windows with nth tag to/from the view. Mod1-Shift-q Quit dwm. Mouse commands Mod1-Button1 Move focused window while dragging. Tiled windows will be toggled to the floating state. Mod1-Button2 Toggles focused window between floating and tiled state. Mod1-Button3 Resize focused window while dragging. Tiled windows will be toggled to the floating state. CUSTOMIZATION
dwm is customized by creating a custom config.h and (re)compiling the source code. This keeps it fast, secure and simple. SEE ALSO
dmenu(1) BUGS
Java applications which use the XToolkit/XAWT backend may draw grey windows only. The XToolkit/XAWT backend breaks ICCCM-compliance in recent JDK 1.5 and early JDK 1.6 versions, because it assumes a reparenting window manager. Possible workarounds are using JDK 1.4 (which doesn't contain the XToolkit/XAWT backend) or setting the environment variable AWT_TOOLKIT=MToolkit (to use the older Motif backend instead) or running xprop -root -f _NET_WM_NAME 32a -set _NET_WM_NAME LG3D or wmname LG3D (to pretend that a non-reparenting window manager is running that the XToolkit/XAWT backend can recognize) or when using OpenJDK setting the environment variable _JAVA_AWT_WM_NONREPARENT- ING=1. GTK 2.10.9+ versions contain a broken Save-As file dialog implementation, which requests to reconfigure its window size in an endless loop. However, its window is still respondable during this state, so you can simply ignore the flicker until a new GTK version appears, which will fix this bug, approximately GTK 2.10.12+ versions. dwm-6.0 DWM(1)
All times are GMT -4. The time now is 02:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy