Sponsored Content
Full Discussion: 2 columns of data
Top Forums UNIX for Dummies Questions & Answers 2 columns of data Post 302728071 by Error404 on Wednesday 7th of November 2012 10:12:19 AM
Old 11-07-2012
Wrench 2 columns of data

Hello folks,

I have been learning Linux for a couple of weeks, and i am facing a simple problem that i couldn't resolve.
I have a file with 2 columns of data, the first coloumn always has text, and the second coloumn sometimes has text and, sometimes blank.
I want to make a new file with the first column hits that match a blank coloumn.

I've bene trying to use cut and grep but couldn't find a formula to indicate empty lines with them.
I hope that was clear Smilie

Thanks,
Error404
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

lining up columns of data

Hi, I have two files containing clumns of data and now I'd like to merge them into one. File one, 1.dat, contains 7 data columns and file two, 2.dat, contains 6 data columns I need a third file, 3.dat, containing on the first 7 columns the data of file 1.dat and on the 8th, 9th etc the 6... (2 Replies)
Discussion started by: pau
2 Replies

2. Shell Programming and Scripting

sort data in different columns

Hello all: i have list with the following format Id Name Iid Value 0x4440001 customerCode 44077 0x11d2a PrimaryAddress 57.217.41.201 0x129fa ... (15 Replies)
Discussion started by: mogabr
15 Replies

3. Shell Programming and Scripting

grep required data from two columns

hello, I have output from a command and I need to filter some info out of that. I tried awk command but I can not grep what I am looking for: Following is the output and I need to capture "disabled" for each volume from first column and report: # vol status Volume State ... (2 Replies)
Discussion started by: za_7565
2 Replies

4. Shell Programming and Scripting

Data in Rows to Columns

Hi, I am a beginner in bash&perl. I have data in form of:- A 1 B 2 C 3 D 4 E 5 I would like your help to find a simple way to change it to :- A B C D E 1 2 3 4 5 Any help would be highly appreciated. (8 Replies)
Discussion started by: umaars
8 Replies

5. UNIX for Dummies Questions & Answers

Suggestion to convert data in rows to data in columns

Hello everyone! I have a huge dataset looking like this: nameX nameX 0 1 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 ............... nameY nameY 2 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 ..... nameB nameB 0 1 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 ..... (can be several thousands of codes) and I need... (8 Replies)
Discussion started by: kush
8 Replies

6. Shell Programming and Scripting

Transpose Data from Columns to rows

Hello. very new to shell scripting and would like to know if anyone could help me. I have data thats being pulled into a txt file and currently have to manually transpose the data which is taking a long time to do. here is what the data looks like. Server1 -- Date -- Other -- value... (7 Replies)
Discussion started by: Mikes88
7 Replies

7. Shell Programming and Scripting

Help need to subtract the data from 2 columns

space_used.lst /dev/vx/dsk/A06487-S01-c4e3s-ORACLE-dg/oradata01 505G 318G 175G 65% /dborafiles/nethealth21/PV/oradata01 /dev/vx/dsk/A06487-S01-c4e3s-ORACLE-dg/oradata02 505G 433G 67G 87% /dborafiles/nethealth21/PV/oradata02 /dev/vx/dsk/A06487-S01-c4e3s-ORACLE-dg/oradata03 507G 422G 79G 85%... (4 Replies)
Discussion started by: sathik
4 Replies

8. Shell Programming and Scripting

Comparision of two data columns in different files

Hi All, I have a requirement to compare data column which is the last field in two different files and trigger and alert if the difference is greater than 1 for each row. File1 Jan Acount1 2014 11223 Feb Account2 2014 2345 Mar Account3 2014 1233 File2 Jan Account1 2014... (1 Reply)
Discussion started by: Naresh Babu
1 Replies

9. Shell Programming and Scripting

Bash formatting data into columns

Hi guys, I'm trying to create a table of aggregated data using just bash commands. My data is in three columns, for example: 2014-01-01 testA 64 2014-01-01 testB 27 2014-02-01 testA 31 2014-02-02 testB 29 2014-02-02 testC 12 And the result I am looking for is: ... (4 Replies)
Discussion started by: mccmjc
4 Replies

10. Shell Programming and Scripting

Converting data from specific columns

i have a file (csv or txt or anything which has 4 columns (id,name,number,location) and it contains data. i want to convert the data of specific columns like name to ooooo and number to 88888 matching the field length of that columns. for example if name column has anthony which is 7, it should... (2 Replies)
Discussion started by: prajaktaraut
2 Replies
SDIFF(1)							   User Commands							  SDIFF(1)

NAME
sdiff - side-by-side merge of file differences SYNOPSIS
sdiff [OPTION]... FILE1 FILE2 DESCRIPTION
Side-by-side merge of file differences. -o FILE --output=FILE Operate interactively, sending output to FILE. -i --ignore-case Consider upper- and lower-case to be the same. -E --ignore-tab-expansion Ignore changes due to tab expansion. -b --ignore-space-change Ignore changes in the amount of white space. -W --ignore-all-space Ignore all white space. -B --ignore-blank-lines Ignore changes whose lines are all blank. -I RE --ignore-matching-lines=RE Ignore changes whose lines all match RE. --strip-trailing-cr Strip trailing carriage return on input. -a --text Treat all files as text. -w NUM --width=NUM Output at most NUM (default 130) print columns. -l --left-column Output only the left column of common lines. -s --suppress-common-lines Do not output common lines. -t --expand-tabs Expand tabs to spaces in output. --tabsize=NUM Tab stops are every NUM (default 8) print columns. -d --minimal Try hard to find a smaller set of changes. -H --speed-large-files Assume large files and many scattered small changes. --diff-program=PROGRAM Use PROGRAM to compare files. -v --version Output version info. --help Output this help. If a FILE is `-', read standard input. Exit status is 0 if inputs are the same, 1 if different, 2 if trouble. AUTHOR
Written by Thomas Lord. REPORTING BUGS
Report bugs to <bug-gnu-utils@gnu.org>. COPYRIGHT
Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
The full documentation for sdiff is maintained as a Texinfo manual. If the info and sdiff programs are properly installed at your site, the command info diff should give you access to the complete manual. diffutils 2.8.7 April 2004 SDIFF(1)
All times are GMT -4. The time now is 09:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy