Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-18-2013
Registered User
 
Join Date: Jun 2009
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Cut command in a matrix

Hi All,

I want to display row=2 and column=1 where value=10 with the help of cut command, Please advice me

1 2 3 4
5 6 7 8
9 10 11 12
Sponsored Links
    #2  
Old 01-18-2013
balajesuri's Avatar
#! /bin/bash
 
Join Date: Apr 2009
Location: India
Posts: 1,565
Thanks: 14
Thanked 440 Times in 425 Posts

Code:
sed -n 3p file | cut -d' ' -f2

If this doesn't suit your requirement, then please provide more information. More info on data samples, logic and desired output would help.
Sponsored Links
    #3  
Old 01-18-2013
Registered User
 
Join Date: Jun 2009
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
thank you balajesuri , it works
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to convert full data matrix to linearised left data matrix? evoll Ubuntu 8 06-03-2011 11:09 AM
Cut Command error cut: Bad range dgmm Shell Programming and Scripting 2 05-22-2011 12:56 PM
Cut and paste data in matrix form dhilipumich Shell Programming and Scripting 7 01-20-2010 06:59 PM
diagonal matrix to square matrix yifangt Shell Programming and Scripting 11 09-12-2009 03:13 PM
Use of Cut Command Puja Sharma AIX 3 03-26-2008 07:49 AM



All times are GMT -4. The time now is 08:34 PM.