![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| awk/sed Command : Parse parameter file / send the lines to the ksh export command | rajan_san | Shell Programming and Scripting | 4 | 11-06-2008 01:29 PM |
| assign a command line argument and a unix command to awk variables | sweta_doshi | Shell Programming and Scripting | 0 | 08-08-2008 07:54 AM |
| Help Required: Command to find IP address and command executed of a user | loggedout | Security | 2 | 08-06-2008 09:12 PM |
| inconsistent ls command display at the command prompt & running as a cron job | rajranibl | SuSE | 5 | 07-30-2007 09:26 AM |
| How to use more than one MPE command STREAM with Unix command in a single shell? | bosskr | Shell Programming and Scripting | 0 | 09-19-2006 10:44 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Cut Command Help Please
Hey Guys, I'm trying to use the cut command to do the following: Code:
"AuctionID","UserID","BidderRating","Bid","BidDateTime" 1070387924,"rmichaelll",46,407.00,2/12/2002 14:07:44 1070387924,"decocloxcolektor",155,402.00,2/12/2002 14:07:28 1070387924,"markartz",6,350.00,2/12/2002 11:11:52 1070387924,"markartz",6,275.00,2/12/2002 1:23:19 This is a file called ebay_sort.dat I'm trying to cut just the AuctionID column only and output to a different file and display to the user. This is what I have so far, but Im still having trouble. Could someone point me in the right direction? Code:
cat ebay_sort.dat | cut -c -f1 | sort -u > acution_list.dat echo echo echo HERE IS THE LIST OF AUCTIONIDS: echo ------------------------------- echo cat acution_list.dat Last edited by Gboy; 11-17-2008 at 10:59 PM.. |
|
||||
|
If you want only the 1st column(AuctionID) then I guess the code below should work Code:
grep -v AuctionID ebay_sort.dat|cut -d"," -f1|sort -u > acution_list.dat It will output the 1st column minus the "AuctionID". Hope that helps. |
|
||||
|
Quote:
it works perfect |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|