The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com


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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Excel related query for the code..need help.. sapan123 Shell Programming and Scripting 10 08-08-2008 02:14 PM
awk related query abhisek.says UNIX for Dummies Questions & Answers 2 05-22-2008 03:49 AM
Query related to scp command sureshg_sampat Shell Programming and Scripting 2 12-03-2007 05:59 AM
sed related query gopsman Shell Programming and Scripting 1 11-30-2007 09:03 AM
Query related to #!/bin/sh sureshg_sampat Shell Programming and Scripting 2 02-08-2007 05:54 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-09-2008
sapan123 sapan123 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 39
Print related query

i Am using the below query and printing the $8 and $9 filed..

find /A/B/C/{1,3,5,7} -name "*.txt" -o -name "*.csv" -o -name "*.TXT" -o -name "*.dat" |xargs ls -ltr |awk '{print $8 ,$9}' > result.xls

this give me the rsult like below..

2008/home/ADMIN/om/1.txt
2008/home/ADMIN/om/hi.txt

this result is comming in the Column A of the excel sheet.

but i need the result $8 in Column A and $9 in column B filed of the excel sheet..


like 2008 in Column A filed which is $8 field and rest in column B which is $9

what i should do with the above query so that the result will come in different column in the excel sheet..

thanks..
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:40 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.

Content Relevant URLs by vBSEO 3.2.0