bash programming: testing for empty string

2008-03-05 Thread bootleg86 bootleg86
Hi,

I'm trying to find the time of a file by doing this.

filetime=`ls -l --time-style=+%a:%H:%M /tmp/1.txt | awk '{print $6}'`

if [ -z $filetime]; then
 echo File does not exist
else
 echo Time file: $filetime
fi

However, when the file does not exist and filetime returns an empty
string, it does not evaluate [ -z $filetime ] to true
I have also tried the reverse which is

if [ -n $filetime]; then
 echo Time file: $filetime
else
 echo File does not exist
fi

but I still get the same results.

What does $filetime evaluate to when the command exits with an error?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Open Documents in the same XEmacs window

2008-02-22 Thread bootleg86 bootleg86
Thanks, winclient is exactly what I wanted.

On Thu, Feb 21, 2008 at 7:19 PM, Reini Urban [EMAIL PROTECTED] wrote:
 2008/2/20, bootleg86 bootleg86 :


  Hi,
  
I installed the Windows binaries for XEmacs, rather than using the
cygwin version.
So I'm not too sure if this is the right place to ask this question.
  
I created a shortcut to xemacs.exe in my SendTo folder.
I then select a document, right-click and then SendTo - XEmacs.
  
But this opens up a new instance of Xemacs every time.
  
Is there a way to configure Xemacs to open only one instance of Xemacs
but keep adding the documents to it's list of buffers?

  Send to winclient.exe, not xemacs.exe
  --
  Reini Urban
  http://phpwiki.org/  http://murbreak.at/
  http://spacemovie.mur.at/   http://helsinki.at/


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Open Documents in the same XEmacs window

2008-02-19 Thread bootleg86 bootleg86
Hi,

I installed the Windows binaries for XEmacs, rather than using the
cygwin version.
So I'm not too sure if this is the right place to ask this question.

I created a shortcut to xemacs.exe in my SendTo folder.
I then select a document, right-click and then SendTo - XEmacs.

But this opens up a new instance of Xemacs every time.

Is there a way to configure Xemacs to open only one instance of Xemacs
but keep adding the documents to it's list of buffers?

Thanks

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Creating user in Documents and Settings on all networked machines

2008-02-05 Thread bootleg86 bootleg86
Hi,

Would it be possible to create a user folder in Documents and
Settings even if I have not logged on to the machine

I was thinking something along the line
for i in `seq -w 1 10`; do cd //machine${i}/c$/Documents and
Settings/; mkdir username; done

What I want to do is to populate the user folder with a couple of shortcuts,
so that when I log on to that machine, I will see all the shortcuts on
my desktop.

Is that possible.

Thanks

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Creating user in Documents and Settings on all networked machines

2008-02-05 Thread bootleg86 bootleg86
I take it the answer is no.

BTW, does anybody know where I can find more information about network
pathnames.
I didn't know about the c$ equivalent to c: until recently when my
colleague told me about it.

And googling for c$ or c dollar doesn't return any relevant results.

On Feb 5, 2008 12:35 PM, Dave Korn [EMAIL PROTECTED] wrote:
 On 05 February 2008 17:18, bootleg86 bootleg86 wrote:

  Hi,
 
  Would it be possible to create a user folder in Documents and
  Settings even if I have not logged on to the machine

   I know windows security is bad, but it's not quite that pathetic!



 cheers,
   DaveK
 --
 Can't think of a witty .sigline today


 --
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 Problem reports:   http://cygwin.com/problems.html
 Documentation: http://cygwin.com/docs.html
 FAQ:   http://cygwin.com/faq/



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/