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

A forum for general AmigaOS 4.x support questions that are not platform-specific
Raziel

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
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4: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.
Raziel

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

Post by Raziel »

@salass00

Ah, nice, thank you

Need to keep this command in mind
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1744
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: 218
Joined: Mon Aug 15, 2011 10: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 3: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: 1744
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: 56
Joined: Tue May 19, 2015 7: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