#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Posts
    10
    Rep Power
    0

    Question *CUT* command (Need Help Please!)


    I have a txt file with over 5,000 names for example one of the names is :

    Jenna Jameson

    I made a text file with all these names deliminated by `:` so it looks like this :

    Jenna:Jameson

    Well I've successfully used the CUT command for the first time to grab all the last names, but how would I go about sending the output to a text file called CO.TXT within the same DIR as CN.TXT (Which contains all the names).

    Here is the command I'm using :
    CUT -f2 -d: cn.txt

    Would appreciate a quick response, thank you kindly for reading this!

    -Dr.Dreidle

  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Posts
    10
    Rep Power
    0

    Talking Silly me!


    Sorry about that silly question, but all of you were newbies at one point and time!

    CUT -f2 -d: cn.txt > co.txt

    works just fine! But I still love this Forum!
  4. #3
  5. o0o.o0o
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Location
    m00n
    Posts
    194
    Rep Power
    102
    You can use a redirect, like:

    CUT -f2 -d: cn.txt > co.txt

    The ">" will redirect the output to the file co.txt; watch out though because the ">" will overwrite co.txt if it is already there. A ">>" will append to co.txt if already there. Hope this solves your problem. Send me the link to the porn library when you get it up

    BTW, what shell are you using?

    Brett

IMN logo majestic logo threadwatch logo seochat tools logo