Re: tr A-Z a-z

2004-05-09 Thread Christoph P. Kukulies
On Sat, May 08, 2004 at 04:20:21PM -0500, Jose Lima wrote:
 I use:
 
 echo $Z | tr '[a-z' '[A-Z]'

This would be a lower case to upper case and would expose the same
problem. And a closing bracket is missing also. Don't know what the 
$Z should mean in your example.

In my example echo Z served as feeding a 'Z'  to the tr pipe.
But the problem is solved. As Kris suspected and someone else explained
it is a locale issue.

One should indeed use :lower: :upper: keywords. Or set the locale
accordingly for old shell scripts to work correctly.


--
Chris Christoph P. U. Kukulies kuku_at_kukulies.org
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tr A-Z a-z

2004-05-08 Thread Jose Lima
I use:

echo $Z | tr '[a-z' '[A-Z]'

Jose Lima


On Fri, 2004-05-07 at 03:53, Christoph Kukulies wrote:
 Strange: I was used to do upper case lower case conversion always like this
 and it suddenly doesn't work anymore:
 
 $ echo Z | tr [A-Z] [a-z]
 
 
 
 --
 Chris Christoph P. U. Kukulies kuku_at_kukulies.org
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tr A-Z a-z

2004-05-08 Thread Julien Gabel
 Strange: I was used to do upper case lower case conversion always like
 this and it suddenly doesn't work anymore:

 $ echo Z | tr [A-Z] [a-z]

You can use special classes in this case too:
 $ echo Zz | tr [:upper:] [:lower:]

-- 
-jpeg.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tr A-Z a-z

2004-05-07 Thread vxla
On Fri, 2004-05-07 at 10:53:01 +0200, Christoph Kukulies proclaimed...

 Strange: I was used to do upper case lower case conversion always like this
 and it suddenly doesn't work anymore:
 
 $ echo Z | tr [A-Z] [a-z]

Works fine for me. However, maybe this would help?

echo Z | tr [:upper:] [:lower:]

-vxla
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tr A-Z a-z

2004-05-07 Thread Kris Kennaway
On Fri, May 07, 2004 at 10:53:01AM +0200, Christoph Kukulies wrote:
 Strange: I was used to do upper case lower case conversion always like this
 and it suddenly doesn't work anymore:
 
 $ echo Z | tr [A-Z] [a-z]
 ÿ

Something locale-related?

Kris


pgp0.pgp
Description: PGP signature


Re: tr A-Z a-z

2004-05-07 Thread Christoph P. Kukulies
On Fri, May 07, 2004 at 03:57:25AM -0500, [EMAIL PROTECTED] wrote:
 On Fri, 2004-05-07 at 10:53:01 +0200, Christoph Kukulies proclaimed...
 
  Strange: I was used to do upper case lower case conversion always like this
  and it suddenly doesn't work anymore:
  
  $ echo Z | tr [A-Z] [a-z]
 
 Works fine for me. However, maybe this would help?
 
 echo Z | tr [:upper:] [:lower:]

Yes, that's how I also worked around it but it is dissatisfying :-)

$LANG=en_US.ISO_8859-1
$LOCALE=
$SHELL=/bin/sh


stty -a

speed 9600 baud; 36 rows; 80 columns;
lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl -oxtabs -onocr -onlret
cflags: cread cs7 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef;
eol2 = undef; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U;
lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

FreeBSD-5.2.1 as well a half year old 5.2-current

--
Chris Christoph P. U. Kukulies kuku_at_kukulies.org
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tr A-Z a-z

2004-05-07 Thread Christoph P. Kukulies
On Fri, May 07, 2004 at 01:59:01AM -0700, Kris Kennaway wrote:
 On Fri, May 07, 2004 at 10:53:01AM +0200, Christoph Kukulies wrote:
  Strange: I was used to do upper case lower case conversion always like this
  and it suddenly doesn't work anymore:
  
  $ echo Z | tr [A-Z] [a-z]
  ÿ
 
 Something locale-related?

locale
LANG=en_US.ISO_8859-1
LC_CTYPE=en_US.ISO_8859-1
LC_COLLATE=en_US.ISO_8859-1
LC_TIME=en_US.ISO_8859-1
LC_NUMERIC=en_US.ISO_8859-1
LC_MONETARY=en_US.ISO_8859-1
LC_MESSAGES=en_US.ISO_8859-1
LC_ALL=

echo Z | tr A-Z a-z | od -x
000  0aff
002

set

USER=kuku
SSH_CLIENT='137.226.9.123 53261 22'
MAIL=/var/mail/kuku
HOME=/home/kuku
SSH_TTY=/dev/ttyp1
PAGER=more
PS1='$ '
OPTIND=1
PS2=' '
LOGNAME=kuku
TERM=vt100
BLOCKSIZE=K
PPID=49204
PATH=.:/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/bin:/home/kuku/bin:/usr/local/jdk1.1.5/bin:/usr/local/jsdk/bin:/usr/X11R6/bin
LANG=en_US.ISO_8859-1
SHELL=/bin/sh
IFS='   
'
CLASSPATH=.:/home/kuku/classes:/usr/local/jdk1.1.5/lib/classes.zip:/usr/local/jdk1.1.5/classes:/usr/local/jserv0.9.11/servclasses.zip:/usr/local/jsdk/lib/classes.zip
SSH_CONNECTION='137.226.9.123 53261 213.146.122.181 22'
FTP_PASSIVE_MODE=YES
EDITOR=vi

It must be something too obvious but I don't see it at the moment.

I found that it depends on my special environment settings.
A different user doesn't have this problem.


--
Chris Christoph P. U. Kukulies kuku_at_kukulies.org
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tr A-Z a-z

2004-05-07 Thread Dan Nelson
In the last episode (May 07), Christoph P. Kukulies said:
 On Fri, May 07, 2004 at 01:59:01AM -0700, Kris Kennaway wrote:
  On Fri, May 07, 2004 at 10:53:01AM +0200, Christoph Kukulies wrote:
   Strange: I was used to do upper case lower case conversion always like this
   and it suddenly doesn't work anymore:
   
   $ echo Z | tr [A-Z] [a-z]
   
  
  Something locale-related?
 
 locale
 LANG=en_US.ISO_8859-1
 LC_COLLATE=en_US.ISO_8859-1

 echo Z | tr A-Z a-z | od -x
 000  0aff
 002

From the tr manpage:

 c-cFor non-octal range endpoints represents the range of
characters between the range endpoints, inclusive, in
ascending order, as defined by the collation sequence.

Note that 8859-1 has uppercase and lowercase accented characters, which
collate alongside the unaccented characters.
/usr/src/share/colldef/la_LN.ISO8859-1.src holds the collation sequence
for en_US.ISO_8859-1.  There are two lowercase y, but three uppercase
Y's.  This means that your ranges are different sizes, and Z maps to
y:, which happens to be 0xff in the 8859-1 charset.

 It must be something too obvious but I don't see it at the moment.
 
 I found that it depends on my special environment settings.
 A different user doesn't have this problem.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Tr: ERROR: Unable to write data to disk idad1

2004-01-16 Thread Jorn Argelo
 (Sorry to insist, I'm still blocked with this unable to write data to
 disk dislaber editor problem. I really need to solve it urgently because
 I need new hd space.

How about providing us with some more information? I would love to have a
crystall ball and see into other people's mind, but alas, I still don't
have it. So, in other words, what is your configuration? What type of
drive are you using? (specs) Is it a RAID setup? If so, what kind of RAID?
What is the configuration of your /etc/fstab? What kind of filesystem are
you using? What is the interface it's attached to? Unless you provide
people with decent information the chance is high that they aren't going
to help you out.

 Is it possible that this problem occurs because the swap partition is also
 idad1s1?

No that shouldn't be the thing, since it's fairly logical to have a swap
partition on the same disk.

 Perhaps you have some ideas I can try?

Cheers,

Jorn


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Tr: ERROR: Unable to write data to disk idad1

2004-01-16 Thread Didier WIROTH
Ok,
It is a compaq smartarray 221 with 4 scsi disks, 9gb each.
1) RAID 1st logical volume 1 of 9gb
2 disks, are mounted as 1 logical (idad0) volume as raid 1

2) LOGICAL VOLUME 2 of 18gb
2 disks, are mounted as 1 logical (idad1) volume 

Here is my fstab:
# Device  Mountpoint  FStype  Options  DumpPass#
/dev/idad1s1b noneswapsw   0   0
/dev/idad0s1a /   ufs rw   1   1
/dev/idad1s1e /tmpufs rw   2   2
/dev/idad0s1e /usrufs rw   2   2
/dev/idad0s1d /varufs rw   2   2
/dev/idad1s1d /var/logufs rw   2   2

Now I wanted to add: 
1) 2GB as ufs to idad1s1f mounted as /home/httdp/vhost/xyz

If possible I would also like to add: 
2)9gb as ufs to idad1s1g mounted as /home/ftpd

But unfortunately I get:
ERROR: Unable to write data to disk idad1

Output of disklabel:
Part  Mount  Size Newfs
  -   -
idad0s1a  none250MB *
idad0s1d  none   1024MB *
idad0s1e  none   7399MB *
idad1s1b  swap 2048MB SWAP
idad1s1d  none   2048MB *
idad1s1e  none   2048MB *

Output of mount:
/dev/idad0s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/idad1s1e on /tmp (ufs, local, soft-updates)
/dev/idad0s1e on /usr (ufs, local, soft-updates)
/dev/idad0s1d on /var (ufs, local, soft-updates)
/dev/idad1s1d on /var/log (ufs, local, soft-updates)


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jorn Argelo
Sent: vendredi 16 janvier 2004 10:44
To: Didier Wiroth
Cc: [EMAIL PROTECTED]
Subject: Re: Tr: ERROR: Unable to write data to disk idad1

 (Sorry to insist, I'm still blocked with this unable to write data to 
 disk dislaber editor problem. I really need to solve it urgently 
 because I need new hd space.

How about providing us with some more information? I would love to have a
crystall ball and see into other people's mind, but alas, I still don't have
it. So, in other words, what is your configuration? What type of drive are
you using? (specs) Is it a RAID setup? If so, what kind of RAID?
What is the configuration of your /etc/fstab? What kind of filesystem are
you using? What is the interface it's attached to? Unless you provide people
with decent information the chance is high that they aren't going to help
you out.

 Is it possible that this problem occurs because the swap partition is 
 also idad1s1?

No that shouldn't be the thing, since it's fairly logical to have a swap
partition on the same disk.

 Perhaps you have some ideas I can try?

Cheers,

Jorn


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Tr: ERROR: Unable to write data to disk idad1

2004-01-16 Thread Didier WIROTH
Forgot to mention it is RAID1
1) RAID 1st logical volume 1 of 9gb
2 disks, are mounted as 1 logical (idad0) volume as raid 1

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: tr

2003-06-20 Thread Will Saxon
cat filename | tr -d '\r'  output  mv output filename

There is also a method spat out by fortune every once in awhile, using col, but I 
can't remember it.

-Will

 -Original Message-
 From: Fabio Miranda Hamburger [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 20, 2003 3:45 PM
 To: [EMAIL PROTECTED]
 Subject: tr
 
 
 How can I remove annoy ^D end of line from MS systems?
 I know there is an utility called dos2unix.
 But I think It's possible to do it with freebsd tr.
 How would that be?
 
 thanks,
 
 ---
 Fabio Andres Miranda
 Ingenieria de sistemas informaticos
 Universidad Latina - Costa Rica
 
 
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 [EMAIL PROTECTED]
 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tr

2003-06-20 Thread Jerry McAllister
 
 How can I remove annoy ^D end of line from MS systems?
 I know there is an utility called dos2unix.
 But I think It's possible to do it with freebsd tr.
 How would that be?

tr -d \r  MSinfile  cleanoutfile

jerry

 
 thanks,
 
 ---
 Fabio Andres Miranda
 Ingenieria de sistemas informaticos
 Universidad Latina - Costa Rica
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tr

2003-06-20 Thread Lowell Gilbert
Will Saxon [EMAIL PROTECTED] writes:

 There is also a method spat out by fortune every once in awhile, using col, but I 
 can't remember it.

/usr/games/fortune -m col freebsd-tips | tail
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tr

2003-06-20 Thread Jez Hancock
On Fri, Jun 20, 2003 at 01:44:37PM -0600, Fabio Miranda Hamburger wrote:
 How can I remove annoy ^D end of line from MS systems?
 I know there is an utility called dos2unix.
 But I think It's possible to do it with freebsd tr.
 How would that be?
As well as the method mentioned in the replies above, you can also 
do this with 'col':

cat file | col -bx  tmp.txt  mv tmp.txt file

One annoying feature of this though is it changes tabs to spaces.

Yet another way is to do a global search/replace in vim:
:%s/
//g
(note this is ctrl-v-m, not ^(caret symbol) m!)

There are a lot of other ways too :)
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]