Re: bug in the "sort" command
[email protected] (Bob Proulx) Sat, 4 Jan 2003 11:47:59 -0700
| Newsgroups | gmane.comp.gnu.textutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
Paulo C?sar Zegarra Lazarte <[email protected]> [2003-01-03 15:06:32 -0600]: > > My name is Paulo Zegarra and I had troubles using the sort command when i try to use it with the next syntasys > > sort -ut/ +2n +1n +0n Thank you for your report. But you did not include very much information. I do not think we can isolate your problem based upon what you provided. > when i use this syntaxis to sort files who content dates separated by / in the format dd/mm/YYYY I can get the result but it doesn't work if i use it in the crontab (background) and if I have several dates in the same file the sort command blank my result. Because you say it works differently when run from cron versus when run from you on the command line I suspect environment variables are different. Check 'LANG' and make sure it is set the same in both. echo $LANG If you can provide a small test case that completely recreates the problem it would help. Here is an example. cat > testfile <<EOF one two three EOF export LC_ALL=POSIX sort < testfile one three two Also, we will need to know the version of sort. sort --vesion locale uname -a Bob