AROS World Exec

General => General Chat => Topic started by: OlafS3 on June 11, 2023, 09:13:09 AM

Title: echo command
Post by: OlafS3 on June 11, 2023, 09:13:09 AM
I am not sure if someone else can confirm it. I am currently trying to make my shell environment as compatible to amigados as possible

I had a example in manual echo "This is workbench $workbench"

workbench is obviously a env variable created by rom. On 3.1 it outputs f.e. 40.42

with sros echo I got "This is workbench $workbench"

echo command did not realize it is only placeholder. I replaced the echo command with one from aminet and added setenv workbench=40.42 and now it correctly output "this is workbench 40.42"

can someone confirm that behavior?
Title: Re: echo command
Post by: Mazze on June 11, 2023, 09:23:24 AM
See screenshot. After setting the environment variable it works as expected. X86_64 ABIv1.
Title: Re: echo command
Post by: OlafS3 on June 11, 2023, 09:26:44 AM
thanx for testing. Then something was wrong at me
Title: Re: echo command
Post by: salass00 on June 11, 2023, 09:31:55 AM
The version of the echo command shouldn't matter as it's not it that handles replacing with the env variable contents, but the shell.

Also in AmigaDOS (unlike Linux) if the variable doesn't exist the variable name is printed as is, as you experienced. In Linux an empty string would be printed instead.
Title: Re: echo command
Post by: OlafS3 on June 11, 2023, 09:45:37 AM
thanx