HELP : compatibility of new console.device OS4.1FE

A forum for general AmigaOS 4.x support questions that are not platform-specific
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: HELP : compatibility of new console.device OS4.1FE

Post by Raziel »

nbache wrote:And you could probably even do it without the explicit reference to PIPE: if you preferred.

For instance, I often do stuff like this after cd'ing to e.g. Kickstart or LIBS:

Code: Select all

list #? lformat "version %s file full" | execute in:
Best regards,

Niels
I get, after a few correctly displayed files, this
VERSION: object not found
version failed returncode 20
execute PIPE:_shell_D5_pipe_1: object not found
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 530
Joined: Sat Jun 18, 2011 3:12 pm
Location: Finland
Contact:

Re: HELP : compatibility of new console.device OS4.1FE

Post by salass00 »

Raziel wrote:
nbache wrote:And you could probably even do it without the explicit reference to PIPE: if you preferred.

For instance, I often do stuff like this after cd'ing to e.g. Kickstart or LIBS:

Code: Select all

list #? lformat "version %s file full" | execute in:
Best regards,

Niels
I get, after a few correctly displayed files, this
VERSION: object not found
version failed returncode 20
execute PIPE:_shell_D5_pipe_1: object not found
You might want to add the FILES switch to the list command so that version is only called on files and not on any directories.
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: HELP : compatibility of new console.device OS4.1FE

Post by Raziel »

@salass00

Ah, nice, thank you

Need to keep this command in mind
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: HELP : compatibility of new console.device OS4.1FE

Post by nbache »

salass00 wrote:You might want to add the FILES switch to the list command so that version is only called on files and not on any directories.
Oops - yes, good point.

Thanks!

Best regards,

Niels
User avatar
colinw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 207
Joined: Mon Aug 15, 2011 9:20 am
Location: Brisbane, QLD. Australia.

Re: HELP : compatibility of new console.device OS4.1FE

Post by colinw »

nbache wrote:
salass00 wrote:You might want to add the FILES switch to the list command so that
version is only called on files and not on any directories.
Oops - yes, good point.
Thanks!
Best regards,
Niels
Am I simply failing to see the point of this horrific convolution to apparently get version info from a directory listing ?
Why are you trying to create a friggin Rube Goldberg machine ?
Have you tried cd'ing to the directory and typing; Version full file #?
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: HELP : compatibility of new console.device OS4.1FE

Post by broadblues »

colinw wrote:[
Am I simply failing to see the point of this horrific convolution to apparently get version info from a directory listing
It's more an example of how to simply use list with lformat and a pipe to execute a program on a file listing without a temp file, as a followup to YesCop comment on why he liked the old third party 'nlist'.

I didn't know about the IN: 'device' so it was usefule for me, at least, my version used explicit pipe: s
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: HELP : compatibility of new console.device OS4.1FE

Post by nbache »

Yes, as broadblues also guessed, it was more or less just the simplest example I could think of to demonstrate what I often do with that technique, like applying a specific JHead command to a number of jpegs in a directory or similar.

BTW, "Version full file #?" does not give you e.g. the option to sort the output like List can - well unless you pipe it to a sort command, of course ;-). (Oh, and C:Sort won't do for that, you'd have to use the sort from SDK:Local/C/.)

Best regards,

Niels
User avatar
polluks
Posts: 55
Joined: Tue May 19, 2015 6:30 pm
Location: Germany
Contact:

Re: HELP : compatibility of new console.device OS4.1FE

Post by polluks »

How about this?

Code: Select all

spat version #? file full
Post Reply