Regular Expressions not alwas working in tcsh

Regular Expressions not alwas working in tcsh

Post by Yog » Sun, 12 Feb 1995 06:40:11



Why might this be happening?:

juju:~/xget> ls
xgetftp/     xgetftp.tar
juju:~/xget> ls -l xget*
ls: xget*: No such file or directory

I can't figure out why my regular expression failed...

Yogi

 
 
 

Regular Expressions not alwas working in tcsh

Post by Jonathan Kame » Mon, 13 Feb 1995 09:03:50


|> Why might this be happening?:
|>
|> juju:~/xget> ls
|> xgetftp/     xgetftp.tar
|> juju:~/xget> ls -l xget*
|> ls: xget*: No such file or directory
|>
|> I can't figure out why my regular expression failed...

Probably because you managed to somehow set noglob:

annex-1-slip-jik:/tmp/foo!19> ls -F
xgetftp/     xgetftp.tar
annex-1-slip-jik:/tmp/foo!20> ls -l xget*
-rw-rw-r--   1 jik      users           0 Feb 11 18:57 xgetftp.tar
xgetftp:
total 0
annex-1-slip-jik:/tmp/foo!21> set noglob
annex-1-slip-jik:/tmp/foo!22> ls -l xget*
ls: xget*: No such file or directory
annex-1-slip-jik:/tmp/foo!23>

The two most common things that set or unset noglob are the X "resize" program
and "tset -s".  If noglob is getting set but not subsequently unset, then
you're probably using one of them wrong.

See the csh and/or tcsh man pages for more information about noglob.

I have cross-posted and directed followups to comp.unix.questions.  This
really has nothing to do with linux.

 
 
 

1. Regular Expressions not alwas working in tcsh

|> Why might this be happening?:
|>
|> juju:~/xget> ls
|> xgetftp/     xgetftp.tar
|> juju:~/xget> ls -l xget*
|> ls: xget*: No such file or directory
|>
|> I can't figure out why my regular expression failed...

Probably because you managed to somehow set noglob:

annex-1-slip-jik:/tmp/foo!19> ls -F
xgetftp/     xgetftp.tar
annex-1-slip-jik:/tmp/foo!20> ls -l xget*
-rw-rw-r--   1 jik      users           0 Feb 11 18:57 xgetftp.tar
xgetftp:
total 0
annex-1-slip-jik:/tmp/foo!21> set noglob
annex-1-slip-jik:/tmp/foo!22> ls -l xget*
ls: xget*: No such file or directory
annex-1-slip-jik:/tmp/foo!23>

The two most common things that set or unset noglob are the X "resize" program
and "tset -s".  If noglob is getting set but not subsequently unset, then
you're probably using one of them wrong.

See the csh and/or tcsh man pages for more information about noglob.

I have cross-posted and directed followups to comp.unix.questions.  This
really has nothing to do with linux.

2. Signal to Noise...

3. Regular expression matching does not work.

4. PGP 4 Linux

5. How to test for regular expression matches in tcsh?

6. NFS

7. Regular Expression: not ending in these words

8. "shutdown now" takes me to "bash"

9. Regular Expression code which works in a multi-threading Unix environment?

10. Which Regular Expression does not match subdirs ?

11. Regular expression: matching one string and not the other

12. NON-trivial regular expression problem (could not find on google)

13. Compare file modification date using tcsh built-ins