Strange behaviour with tail command

You have a problem with Salix? Post here and we'll do what we can to help.
percoco2000
Posts: 8
Joined: 10. May 2023, 07:08

Re: Strange behaviour with tail command

Post by percoco2000 »

Now i'm wondering why your last command didn't give you an error........
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Strange behaviour with tail command

Post by laprjns »

percoco2000 wrote: 17. May 2023, 10:01 Now i'm wondering why your last command didn't give you an error........
Because I did this;
gapan wrote: 12. May 2023, 23:36 You can override it with:

Code: Select all

export _POSIX2_VERSION=200809
Note that it’s not persistent.
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
percoco2000
Posts: 8
Joined: 10. May 2023, 07:08

Re: Strange behaviour with tail command

Post by percoco2000 »

Well ,... Tankyou, my script now works well.
But i still think it's a bug. The old style compatibility is meant to accept options like "tail -20", without "-c". This explains also why -c -2 works, and not -c +2.
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Strange behaviour with tail command

Post by laprjns »

From gapan post
# Compilation with glibc version later than 2.3.2 needs the environment
# variable DEFAULT_POSIX2_VERSION set to 199209.
# Without that line, the coreutils will start complaining about 'obsolete'
# command switches, like "tail -20" will be considered obsolete.
# This behaviour breaks many other packages... the 'obsolete' parameters are
# too commonly used to disregard them. Better to stick with the older more
# widely accepted standards until things begin to demand the new way.
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
percoco2000
Posts: 8
Joined: 10. May 2023, 07:08

Re: Strange behaviour with tail command

Post by percoco2000 »

Saw them... But in this specific case it doesn't complain, it trows out a "file not found error.."
Post Reply