Re: How to sort find results

From: Jeffrey Ellis (jellis_at_dhnet.us)
Date: 11/08/05

  • Next message: Drew Tomlinson: "Disk Access Seems Slow in 5.4"
    Date: Tue, 08 Nov 2005 09:47:00 -0800
    To: David Fleck <david.fleck@mchsi.com>, FreeBSD questions <freebsd-questions@freebsd.org>
    
    

    Hi, David--

    That did it! Thank you :)

    So, now when I run it I get the following output:

    # ./date_sort /desktop
    Sep 13 11:10:34 2005 /desktop/.localized
    Nov 8 09:12:40 2005 /desktop/date_sort

    But there are actually 76 items on my desktop. Is it possible I'm not
    specifying an option correctly?

    Thanks again :)

    All My Best,
    Jeffrey

    on 11/8/05 5:31 AM, David Fleck at david.fleck@mchsi.com wrote:

    > On Mon, 7 Nov 2005, Jeffrey Ellis wrote:
    >> It's on my Desktop. Should it be in particular location? (Don't say it...
    >> Something obvious, right ;)
    >
    > It doesn't have to be anywhere in particular, as long as you can find it
    > when you want to run it. When you typed
    >
    >>> #head date_sort
    >>> head: date_sort: No such file or directory
    >
    > I assume that the date_sort script wasn't in the directory you were
    > running the 'head' command from. In this case, you'd have to run it as
    >
    > #head /full/path/to/date_sort
    >
    > otherwise 'head' won't be able to find date_sort.
    >
    >> I actually did see his email. I've checked the copy/paste of the script, and
    >> it looks like all carriage returns. I don't know how to type line feeds...
    >> Is that what they should be?
    >
    > The problem is that Windows and UNIX have different concepts of how to end
    > lines. Windows (and some mail programs, and possibly some web servers -
    > I'm just guessing here) think each line of a text-mode should end with a
    > carriage return (CR) followed by a line feed (LF). UNIX doesn't
    > distinguish between text-mode and binary-mode files, and thinks a line
    > should end with just an LF, and the CR is retained as extra junk at the
    > end of the line.
    >
    > The easiest way that I know of to check for and handle this problem (which
    > may not be the easiest way to handle it, but it's the one I'm familiar
    > with) is to use the 'vi' editor. I don't know if you're familiar with
    > 'vi'; it can be a little confusing to the uninitiated. The following
    > should step you through it -- make a backup of the date_sort file first.
    >
    > 1. cd to the directory containing date_sort.
    >
    > 2. Open the file in vi:
    > #vi date_sort
    >
    > 3. Type the following, where [Ctrl] means the Ctrl key, and [Enter] means
    > the Enter key:
    >
    > :%s/[Ctrl]V[Enter]//[Enter]
    >
    > 4. Save the result:
    > :wq[Enter]
    >
    > Now, hopefully, the CR-LF's have all been converted to LF's. Try running
    > the script again (personally, I'd test it on a smaller directory structure
    > than /, just to see if it works -- running it on / will probably take a
    > long while).
    >
    > The output of 'head /path/to/date_sort' may still be useful, btw.
    >
    > --
    > David Fleck
    > david.fleck@mchsi.com
    >

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Drew Tomlinson: "Disk Access Seems Slow in 5.4"

    Relevant Pages

    • Re: e.onmousedown= funciton () { return !1; };
      ... likely that every document will be created with head and body elements ... immediately available for any a script that exists in a valid "normal" ... without waiting for onload or "ready" function. ... when higher level code wants to use that low-level code, ...
      (comp.lang.javascript)
    • Re: Is there a correct place to put javascript within a html file?
      ... The HTML specification tells you where script elements are permitted: ... script files have downloaded and if they're all in the head ... ... like the sensible thing to do; at least there's a reason for it. ... javascript is positioned just before the then the various html ...
      (comp.lang.javascript)
    • Re: Installing Linux on a Windows dual boot system
      ... batting your head against, so it feels twice as good when you stop. ... Linux and XP) and a removable CD that can be shared by both which has ... However, as I'm sure that your point is a sarcastic jab at Windows, I ... I've been using various flavors of Unix since about 1978, ...
      (comp.os.linux.setup)
    • Re: my if comands are still not working. please help
      ... but you're over my head. ... function showorders() { ... alert("start of show orders script"); ... the file is not a htm, html file it is a .js file that is called from a htm file that has ...
      (microsoft.public.frontpage.programming)
    • Re: e.onmousedown= funciton () { return !1; };
      ... likely that every document will be created with head and body elements ... The window, document, document.documentElement properties are immediately available for any a script that exists in a valid "normal" page. ... Not including the scripts in the head also allows the script access to document.body, without waiting for onload or "ready" function. ... However, requiring low level code to exist in the body can cause inconvenience when higher level code wants to use that low-level code, but that higher level code wants to exist in the head ). ...
      (comp.lang.javascript)

    Loading