why is this?

why is this?

Post by * Tong » Thu, 28 Jun 2001 12:16:22



Hi,

Look at the following results:

$ echo 'aaa\citep{bb}' | sed 's|\\citep{| \\citep{|g'
aaa \citep{bb}

$ cmd="sed 's|\citep{| \citep{|g'"

$ echo 'aaa\citep{bb}' | eval $cmd
aaa\ citep{bb}

Notice the command is identical except eval, but the result is different!
why this extra eval changes the result?

Thanks

--
Tong (remove underscore(s) to reply)
  *niX Power Tools Project: http://xpt.sourceforge.net/
  - All free contribution & collection

 
 
 

why is this?

Post by t.. » Thu, 28 Jun 2001 16:58:40



Quote:> Look at the following results:

> $ echo 'aaa\citep{bb}' | sed 's|\\citep{| \\citep{|g'
> aaa \citep{bb}

> $ cmd="sed 's|\citep{| \citep{|g'"

> $ echo 'aaa\citep{bb}' | eval $cmd
> aaa\ citep{bb}

> Notice the command is identical except eval, but the result is different!

No it isn't. In the first case you have double backslashes, in $cmd
they're single.

Incidentally, under HP-UX 11.0 neither produces any output whatsoever
(nor probably under any sysV-derived system).
Using echo that way is not particularly portable.

--
Tapani Tarvainen

 
 
 

1. Why am I not 'Logged in' ?

Hi,

I am using Sun O.S. 4.1.1

I use screen to open multiple windows on my vt100 terminal. This
morning, when I tried to set up an alarm for myself using 'leave', I
got the following error message :

Script started on Thu Jun  4 10:00:01 1992
%>leave 1010
leave: You are not logged in
script done on Thu Jun  4 10:00:13 1992

Why am I not logged in ? Is this a bug in screen ?

Thanx in advance.

Cheers,

--

2. FTP site for 'sudo' program wanted

3. DAMN: Why am I getting the message over and over again?

4. Bacula/Amanda Question

5. Why am I getting extra bytes?

6. Need root floppy with TCP/IP

7. Why am I not getting the right port number?

8. (Howto?) Configure PPP dialin support on RH 7.3

9. Why am I loosing the macros??

10. Why am I getting Kernel Panic VFS cannot mount root fs on 301?

11. Why am I spamming the group?!?

12. Why am I getting "ILLEGAL PORT COMMAND" messages?

13. why am i getting packets here...?