• Question

    From Torsten Bamberg@2:240/5832 to Joe Schweier on Friday, November 23, 2018 18:02:10
    Hallo Joe!

    22.11.2018 06:36, Joe Schweier schrieb an All:

    That line captures the current date and then I can add it into my BBS
    ad txt file....

    Anyway, is there a similar command for OS/2??
    Sure. It's called date. I use plain os/2 rexx for similar things.

    Usually all plain dos-batches should work on OS/2 too. If not, you can try another shell called 4os2 similar to 4dos or use one of the available shells ported from unix/linux, like sh/ash or bash.


    Thanx
    Joe
    Bye/2 Torsten

    ... MAILBOX01: up 6d 17h 22m load: 36 proc, 156 threads (tbupv1.0)
    --- GoldED+ 1.1.5-18
    * Origin: DatenBahn BBS Hamburg (2:240/5832)
  • From Joe Schweier@1:342/200 to Torsten Bamberg on Friday, November 23, 2018 11:32:12
    Hallo Joe!

    22.11.2018 06:36, Joe Schweier schrieb an All:

    That line captures the current date and then I can add it into my BBS
    ad txt file....

    Anyway, is there a similar command for OS/2??
    Sure. It's called date. I use plain os/2 rexx for similar
    things.

    Usually all plain dos-batches should work on OS/2 too. If
    not, you can try another shell called 4os2 similar to
    4dos or use one of the available shells ported from
    unix/linux, like sh/ash or bash.


    Didn't work... Thanx though.... I'll just look at a Windows solution... Linux if I'm pressed.

    Thanx
    Joe

    ---
    * Origin: Joe's Mail System 1:342/200 -=joesbbs.com=- (1:342/200)
  • From Torsten Bamberg@2:240/5832 to Joe Schweier on Saturday, November 24, 2018 01:31:48
    Hallo Joe!

    23.11.2018 11:32, Joe Schweier schrieb an Torsten Bamberg:

    [date on os/2]
    Didn't work...
    Well, seems to be, arcanoa changed something there. On ecomstation 2.2 date.exe
    depends on gnu-date. Underneath is the current helpfile of my date.exe

    =##= Anfang "dateh.txt" =##=
    Usage: C:\ecs\KLIBC\bin\date.exe [OPTION]... [+FORMAT]
    or: C:\ecs\KLIBC\bin\date.exe [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]] Display the current time in the given FORMAT, or set the system date.

    -d, --date=STRING display time described by STRING, not `now'
    -f, --file=DATEFILE like --date once for each line of DATEFILE
    -r, --reference=FILE display the last modification time of FILE
    -R, --rfc-2822 output date and time in RFC 2822 format
    --rfc-3339=TIMESPEC output date and time in RFC 3339 format.
    TIMESPEC=`date', `seconds', or `ns' for
    date and time to the indicated precision.
    -s, --set=STRING set time described by STRING
    -u, --utc, --universal print or set Coordinated Universal Time
    --help display this help and exit
    --version output version information and exit

    FORMAT controls the output. The only valid option for the second form specifies Coordinated Universal Time. Interpreted sequences are:

    %% a literal %
    %a locale's abbreviated weekday name (e.g., Sun)
    %A locale's full weekday name (e.g., Sunday)
    %b locale's abbreviated month name (e.g., Jan)
    %B locale's full month name (e.g., January)
    %c locale's date and time (e.g., Thu Mar 3 23:05:25 2005)
    %C century; like %Y, except omit last two digits (e.g., 21)
    %d day of month (e.g, 01)
    %D date; same as %m/%d/%y
    %e day of month, space padded; same as %_d
    %F full date; same as %Y-%m-%d
    %g last two digits of year of ISO week number (see %G)
    %G year of ISO week number (see %V); normally useful only with %V
    %h same as %b
    %H hour (00..23)
    %I hour (01..12)
    %j day of year (001..366)
    %k hour ( 0..23)
    %l hour ( 1..12)
    %m month (01..12)
    %M minute (00..59)
    %n a newline
    %N nanoseconds (000000000..999999999)
    %p locale's equivalent of either AM or PM; blank if not known
    %P like %p, but lower case
    %r locale's 12-hour clock time (e.g., 11:11:04 PM)
    %R 24-hour hour and minute; same as %H:%M
    %s seconds since 1970-01-01 00:00:00 UTC
    %S second (00..60)
    %t a tab
    %T time; same as %H:%M:%S
    %u day of week (1..7); 1 is Monday
    %U week number of year, with Sunday as first day of week (00..53)
    %V ISO week number, with Monday as first day of week (01..53)
    %w day of week (0..6); 0 is Sunday
    %W week number of year, with Monday as first day of week (00..53)
    %x locale's date representation (e.g., 12/31/99)
    %X locale's time representation (e.g., 23:13:48)
    %y last two digits of year (00..99)
    %Y year
    %z +hhmm numeric timezone (e.g., -0400)
    %:z +hh:mm numeric timezone (e.g., -04:00)
    %::z +hh:mm:ss numeric time zone (e.g., -04:00:00)
    %:::z numeric time zone with : to necessary precision (e.g., -04, +05:30)
    %Z alphabetic time zone abbreviation (e.g., EDT)

    By default, date pads numeric fields with zeroes.
    The following optional flags may follow `%':

    - (hyphen) do not pad the field
    _ (underscore) pad with spaces
    0 (zero) pad with zeros
    ^ use upper case if possible
    # use opposite case if possible

    After any flags comes an optional field width, as a decimal number;
    then an optional modifier, which is either
    E to use the locale's alternate representations if available, or
    O to use the locale's alternate numeric symbols if available.

    Report bugs to <bug-coreutils@gnu.org>.
    =##= Ende "dateh.txt" =##=

    Thanx though.... I'll just look at a Windows solution... Linux if I'm pressed.
    Ah, okay.

    btw...if you are interested, os/2 rexx is a very powerfull batch language.

    Thanx
    Joe
    Bye/2 Torsten

    ... MAILBOX01: up 6d 17h 22m load: 36 proc, 156 threads (tbupv1.0)
    --- GoldED+ 1.1.5-18
    * Origin: DatenBahn BBS Hamburg (2:240/5832)
  • From mark lewis@1:3634/12.73 to Joe Schweier on Sunday, November 25, 2018 09:13:12

    On 2018 Nov 22 06:36:04, you wrote to All:

    for /f "delims=" %%x in.... See it in the section beclow??

    4DOS for the DOS side and 4OS2 for the OS2 side... seriously... you won't have to use weird constructs like that any more... these make bat scripting almost as capable as bash scripting on *nix... i don't even use daynbr because these have things like that built in as variables or functions...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... We can save the seals if we all club together.
    ---
    * Origin: (1:3634/12.73)
  • From Joe Schweier@1:342/200 to Torsten Bamberg on Sunday, November 25, 2018 10:14:26
    That was more than I was looking for... Looking through it... I don't do OS/2 much... used it in the mid 90's bought it to play with it... I have some BBS software that is OS/2 and I'm playing with it.

    I'll just ask one more time... do you know the commandline needed to echo the current darte into an asc or TXT file??

    Because the one I used for windows and or DOS doesn't work.

    Thanx

    Joe

    ---
    * Origin: Joe's Mail System 1:342/200 -=joesbbs.com=- (1:342/200)
  • From Tommi Koivula@2:221/360 to Joe Schweier on Sunday, November 25, 2018 20:50:40

    Sunday November 25 2018 10:14, Joe Schweier wrote to Torsten Bamberg:

    That was more than I was looking for... Looking through it... I don't do OS/2 much... used it in the mid 90's bought it to play with it... I have some BBS software that is OS/2 and I'm playing with it.

    I'll just ask one more time... do you know the commandline needed to echo the current darte into an asc or TXT file??

    Because the one I used for windows and or DOS doesn't work.

    I strongly recommend 4os2.

    === Begin OS/2 Clipboard ===

    [c:\]echo %_date %_time
    25.11.18 20.50.08

    [c:\]ver/r

    4OS2 3.08.4-shl OS/2 Version is 4,50
    Build 3.08.4-shl.168 (Feb 18 2018 16:09:35)
    Copyright (c) 1988-2002 JP Software, Inc -- http://jpsoft.com/
    Netlabs Edition http://4os2.netlabs.org/ -- not supported by JP Software, Inc. Built with Open Watcom C/C++ -- http://www.openwatcom.org/

    === End OS/2 Clipboard ===

    'Tommi

    --- GoldED+/EMX 1.1.5-b20180707
    * Origin: ---------------------------------->> (2:221/360)
  • From Torsten Bamberg@2:240/5832 to Joe Schweier on Sunday, November 25, 2018 21:00:21
    Hallo Joe!

    25.11.2018 10:14, Joe Schweier schrieb an Torsten Bamberg:

    That was more than I was looking for... Looking through it... I don't
    do OS/2 much... used it in the mid 90's bought it to play with it... I have some BBS software that is OS/2 and I'm playing with it.
    Well, the date.exe command on arcaos/ecomstation is very special.

    I'll just ask one more time... do you know the commandline needed to
    echo the current darte into an asc or TXT file??
    It works in two easy ways:
    1.)
    c:\Foo\klibc\bin\date -u >> joes.asc

    the path to date.exe must be used. Otherwise date wont work properly. Seems to be a big bug.

    the second way is like this:

    =##= Anfang "date_.cmd" =##= /*-------------------------------------------------------------------------*/ /* date_.cmd */ /* Rexx for typical date */ /* 25.11.2018 Torsten Bamberg */ /*-------------------------------------------------------------------------*/ call RxFuncAdd 'SysSleep', 'RexxUtil', 'SysSleep'

    datestring=date('N')

    foo_out = joes.asc

    echo' 'datestring' >> 'foo_out

    exit(0)
    =##= Ende "date_.cmd" =##=


    This rexx script creates or appends a 11/25/18 in a textfile named joes.asc

    Because the one I used for windows and or DOS doesn't work.
    I know this now. the date-command is a bit tricky and buggy.

    Thanx
    You are welcome.

    Joe
    Bye/2 Torsten

    ... MAILBOX01 on OS2: up 8d 18h 02m load: 42 proc, 162 threads (tbupv1.0)
    --- GoldED+ 1.1.5-18
    * Origin: DatenBahn BBS Hamburg (2:240/5832)
  • From Sean Dennis@1:18/200 to Torsten Bamberg on Sunday, November 25, 2018 22:18:29
    Hello Torsten,

    25 Nov 18 21:00 at you wrote to Joe Schweier:

    Well, the date.exe command on arcaos/ecomstation is very special.

    The "date" command in the 16-bit CMD.EXE in OS/2 can't display the date only but has a prompt to change the date. The date command in eCS/ArcaOS is based on the GNU 'date' command which will do what Joe's wanting. Or, instead of screwing around with batch commands, run a single REXX command which will do what he wants. One of the best parts of OS/2 is REXX. :)

    Later,
    Sean

    ... Hold a true friend with both your hands. - Nigerian proverb
    --- GoldED+/LNX 1.1.5-b20170303
    * Origin: Outpost BBS * Limestone, TN, USA (1:18/200)