• Another question Re: Print (or export to a spreadsheet) all the informa

    From Dudley Brooks@21:1/5 to All on Fri May 3 11:50:17 2024
    I forgot to ask. Can I add something to your now-working line

    stat -f '%SN,%SB,%Sm' * > file_times.txt

    to reformat date and time? Either within the -f format description or
    piping it to something else?

    On the internet I found this, supposedly to simply reformat date and
    time, for everything, during a session:

    set timefmt "%Y-%m-%d %H:%M:%S"

    But it doesn't seem to be working either. I execute it, then do "date"
    or "ls -l" or whatever ... and the date and time are still displayed in
    the same format as ever.

    Thanks in advance.

    --
    Dudley Brooks, Artistic Director
    Run For Your Life! ... it's a dance company!
    San Francisco

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jolly Roger@21:1/5 to Dudley Brooks on Sat May 4 20:43:01 2024
    On 2024-05-03, Dudley Brooks <dbrooks@runforyourlife.org> wrote:
    I forgot to ask. Can I add something to your now-working line

    stat -f '%SN,%SB,%Sm' * > file_times.txt

    to reformat date and time? Either within the -f format description or
    piping it to something else?

    On the internet I found this, supposedly to simply reformat date and
    time, for everything, during a session:

    set timefmt "%Y-%m-%d %H:%M:%S"

    But it doesn't seem to be working either. I execute it, then do "date"
    or "ls -l" or whatever ... and the date and time are still displayed in
    the same format as ever.

    Thanks in advance.

    Create a plain text file named "lister.sh" with these contents:

    #!/usr/bin/env bash

    for file in ./*; do
    filename=`basename "$file"`

    created=`stat -f '%SB' "$filename"`
    modified=`stat -f '%Sm' "$filename"`

    created_s=`date -j -f "%b %d %H:%M:%S %Y" "$created" "+%F %H:%M:%S"`
    modified_s=`date -j -f "%b %d %H:%M:%S %Y" "$modified" "+%F %H:%M:%S"`

    echo "$filename,$created_s,$modified_s"
    done

    Make the script executable with this command in the same directory as
    the script:

    chmod +x lister.sh

    Run the script in a terminal window like so:

    ./lister.sh > file_times.csv

    --
    E-mail sent to this address may be devoured by my ravenous SPAM filter.
    I often ignore posts from Google. Use a real news client instead.

    JR

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jolly Roger@21:1/5 to Dudley Brooks on Thu May 30 00:43:06 2024
    On 2024-05-30, Dudley Brooks <dbrooks@runforyourlife.org> wrote:
    On 5/4/24 1:43 PM, Jolly Roger wrote:
    On 2024-05-03, Dudley Brooks <dbrooks@runforyourlife.org> wrote:

    I forgot to ask. Can I add something to your now-working line

    stat -f '%SN,%SB,%Sm' * > file_times.txt

    to reformat date and time? Either within the -f format description or
    piping it to something else?

    On the internet I found this, supposedly to simply reformat date and
    time, for everything, during a session:

    set timefmt "%Y-%m-%d %H:%M:%S"

    But it doesn't seem to be working either. I execute it, then do "date"
    or "ls -l" or whatever ... and the date and time are still displayed in
    the same format as ever.

    Thanks in advance.

    Create a plain text file named "lister.sh" with these contents:

    #!/usr/bin/env bash

    for file in ./*; do
    filename=`basename "$file"`

    created=`stat -f '%SB' "$filename"`
    modified=`stat -f '%Sm' "$filename"`

    created_s=`date -j -f "%b %d %H:%M:%S %Y" "$created" "+%F %H:%M:%S"`
    modified_s=`date -j -f "%b %d %H:%M:%S %Y" "$modified" "+%F %H:%M:%S"`

    echo "$filename,$created_s,$modified_s"
    done

    Make the script executable with this command in the same directory as
    the script:

    chmod +x lister.sh

    Run the script in a terminal window like so:

    ./lister.sh > file_times.csv

    As I mentioned in another thread (in another ng, actually,
    comp.sys.mac.apps) I didn't have time to try your suggestion until quite recently, and didn't have time to thank you until just now.

    It worked perfectly! And it's clear enough that I can modify it myself
    to do another couple of minor things I might want to do.

    Thanks!

    You're welcome. Glad to hear it worked for you.

    You may find this funny. I was told just in the past day or two by a
    resident troll in the iPhone news group that I have never written a
    single line of code. He also claims I never made it through high school
    along with a bunch of other juvenile personal attacks. 🤣

    --
    E-mail sent to this address may be devoured by my ravenous SPAM filter.
    I often ignore posts from Google. Use a real news client instead.

    JR

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dudley Brooks@21:1/5 to Jolly Roger on Wed May 29 17:34:24 2024
    As I mentioned in another thread (in another ng, actually,
    comp.sys.mac.apps) I didn't have time to try your suggestion until quite recently, and didn't have time to thank you until just now.

    It worked perfectly! And it's clear enough that I can modify it myself
    to do another couple of minor things I might want to do.

    Thanks!

    On 5/4/24 1:43 PM, Jolly Roger wrote:

    On 2024-05-03, Dudley Brooks <dbrooks@runforyourlife.org> wrote:

    I forgot to ask. Can I add something to your now-working line

    stat -f '%SN,%SB,%Sm' * > file_times.txt

    to reformat date and time? Either within the -f format description or
    piping it to something else?

    On the internet I found this, supposedly to simply reformat date and
    time, for everything, during a session:

    set timefmt "%Y-%m-%d %H:%M:%S"

    But it doesn't seem to be working either. I execute it, then do "date"
    or "ls -l" or whatever ... and the date and time are still displayed in
    the same format as ever.

    Thanks in advance.

    Create a plain text file named "lister.sh" with these contents:

    #!/usr/bin/env bash

    for file in ./*; do
    filename=`basename "$file"`

    created=`stat -f '%SB' "$filename"`
    modified=`stat -f '%Sm' "$filename"`

    created_s=`date -j -f "%b %d %H:%M:%S %Y" "$created" "+%F %H:%M:%S"`
    modified_s=`date -j -f "%b %d %H:%M:%S %Y" "$modified" "+%F %H:%M:%S"`

    echo "$filename,$created_s,$modified_s"
    done

    Make the script executable with this command in the same directory as
    the script:

    chmod +x lister.sh

    Run the script in a terminal window like so:

    ./lister.sh > file_times.csv
    --
    Dudley Brooks, Artistic Director
    Run For Your Life! ... it's a dance company!
    San Francisco

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dudley Brooks@21:1/5 to Jolly Roger on Sun Jun 2 16:20:02 2024
    On 5/29/24 5:43 PM, Jolly Roger wrote:

    On 2024-05-30, Dudley Brooks <dbrooks@runforyourlife.org> wrote:

    On 5/4/24 1:43 PM, Jolly Roger wrote:

    On 2024-05-03, Dudley Brooks <dbrooks@runforyourlife.org> wrote:

    I forgot to ask. Can I add something to your now-working line

    stat -f '%SN,%SB,%Sm' * > file_times.txt

    to reformat date and time? Either within the -f format description or >>>> piping it to something else?

    On the internet I found this, supposedly to simply reformat date and
    time, for everything, during a session:

    set timefmt "%Y-%m-%d %H:%M:%S"

    But it doesn't seem to be working either. I execute it, then do "date" >>>> or "ls -l" or whatever ... and the date and time are still displayed in >>>> the same format as ever.

    Thanks in advance.

    Create a plain text file named "lister.sh" with these contents:

    #!/usr/bin/env bash

    for file in ./*; do
    filename=`basename "$file"`

    created=`stat -f '%SB' "$filename"`
    modified=`stat -f '%Sm' "$filename"`

    created_s=`date -j -f "%b %d %H:%M:%S %Y" "$created" "+%F %H:%M:%S"` >>> modified_s=`date -j -f "%b %d %H:%M:%S %Y" "$modified" "+%F %H:%M:%S"` >>>
    echo "$filename,$created_s,$modified_s"
    done

    Make the script executable with this command in the same directory as
    the script:

    chmod +x lister.sh

    Run the script in a terminal window like so:

    ./lister.sh > file_times.csv

    As I mentioned in another thread (in another ng, actually,
    comp.sys.mac.apps) I didn't have time to try your suggestion until quite
    recently, and didn't have time to thank you until just now.

    It worked perfectly! And it's clear enough that I can modify it myself
    to do another couple of minor things I might want to do.

    Thanks!

    You're welcome. Glad to hear it worked for you.

    You may find this funny. I was told just in the past day or two by a
    resident troll in the iPhone news group that I have never written a
    single line of code. He also claims I never made it through high school
    along with a bunch of other juvenile personal attacks. 🤣

    I wish trolls were just as imaginary as the things they say.

    Why can't they just limit themselves to hiding under bridges and saying
    "Who's that tramping on my bridge!"


    --
    Dudley Brooks, Artistic Director
    Run For Your Life! ... it's a dance company!
    San Francisco

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Your Name@21:1/5 to Dudley Brooks on Mon Jun 3 12:17:14 2024
    On 2024-06-02 23:20:02 +0000, Dudley Brooks said:
    On 5/29/24 5:43 PM, Jolly Roger wrote:
    On 2024-05-30, Dudley Brooks <dbrooks@runforyourlife.org> wrote:
    On 5/4/24 1:43 PM, Jolly Roger wrote:
    On 2024-05-03, Dudley Brooks <dbrooks@runforyourlife.org> wrote:

    I forgot to ask. Can I add something to your now-working line

    stat -f '%SN,%SB,%Sm' * > file_times.txt

    to reformat date and time? Either within the -f format description or >>>>> piping it to something else?

    On the internet I found this, supposedly to simply reformat date and >>>>> time, for everything, during a session:

    set timefmt "%Y-%m-%d %H:%M:%S"

    But it doesn't seem to be working either. I execute it, then do "date" >>>>> or "ls -l" or whatever ... and the date and time are still displayed in >>>>> the same format as ever.

    Thanks in advance.

    Create a plain text file named "lister.sh" with these contents:

    #!/usr/bin/env bash

    for file in ./*; do
    filename=`basename "$file"`

    created=`stat -f '%SB' "$filename"`
    modified=`stat -f '%Sm' "$filename"`

    created_s=`date -j -f "%b %d %H:%M:%S %Y" "$created" "+%F %H:%M:%S"`
    modified_s=`date -j -f "%b %d %H:%M:%S %Y" "$modified" "+%F %H:%M:%S"` >>>>
    echo "$filename,$created_s,$modified_s"
    done

    Make the script executable with this command in the same directory as
    the script:

    chmod +x lister.sh

    Run the script in a terminal window like so:

    ./lister.sh > file_times.csv

    As I mentioned in another thread (in another ng, actually,
    comp.sys.mac.apps) I didn't have time to try your suggestion until quite >>> recently, and didn't have time to thank you until just now.

    It worked perfectly! And it's clear enough that I can modify it myself
    to do another couple of minor things I might want to do.

    Thanks!

    You're welcome. Glad to hear it worked for you.

    You may find this funny. I was told just in the past day or two by a
    resident troll in the iPhone news group that I have never written a
    single line of code. He also claims I never made it through high school
    along with a bunch of other juvenile personal attacks. 🤣

    I wish trolls were just as imaginary as the things they say.

    Why can't they just limit themselves to hiding under bridges and saying "Who's that tramping on my bridge!"

    Because fools in cargo ships or big trucks keep crashing into the bridges. ;-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)