LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 10-04-2010, 12:20 PM   #16
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179

What is the current script? There was a typo in [[ PID -eq MYPID ]] && continue which should have been [[ $PID -eq $MYPID ]] && continue.
 
Old 10-05-2010, 04:30 AM   #17
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 16

Rep: Reputation: 233Reputation: 233Reputation: 233
@catkin No it's meant to be that way. They are just the same with integers.
 
Old 10-05-2010, 07:44 AM   #18
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Quote:
Originally Posted by konsolebox View Post
@catkin No it's meant to be that way. They are just the same with integers.
Neat. How does that work? Is it that the presence of a numeric operator within the [[ ... ]] makes bash treat the logical expression as a numeric expression, in which the $ operator ($ means "value of") is implied?
 
Old 10-06-2010, 06:03 AM   #19
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 16

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by catkin View Post
Neat. How does that work? Is it that the presence of a numeric operator within the [[ ... ]] makes bash treat the logical expression as a numeric expression, in which the $ operator ($ means "value of") is implied?
Yup something like that. Maybe with -eq and the likes. That's really one of the greatest difference between test or [ and [[.
 
Old 10-06-2010, 09:37 AM   #20
binbash
LQ Newbie
 
Registered: Sep 2010
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by konsolebox View Post
The script's only meant to run with bash. If sh.exe is your default shell, that might give a difference with operations.
well I am running it within bash
c:\cygwin\bin\bash.exe /cygdrive/c/scripts/singlei.sh $1 $2 $3 $4

but have noticed that sometimes it says

error in program=C:\cygwin\bin\sh.exe

and sometimes

error in program=C:\cygwin\bin\bash.exe

have sh.exe stackdumps in some folders and bash.exe stackdumps in other folders so I guess it is some cygwin behaviour

I still haven't really narrowed down what exactly leads to it 'locking it'

but a friend left me a note saying a number of blank (as they appear when queued anyway) bash windows had opened up and all of them were using some cpu and 7 lock files were in the folder - he said he left them open - but they were closed and only 1 lock file in the folder when I logged on so they must have exited at some point

though it seems that closing one of the windows causes them all to close and things to start working again when the script is run again
 
  


Reply

Tags
bash, cygwin


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] escaping a single quote from a bash script atbrew Programming 8 07-21-2010 10:21 AM
[SOLVED] Using a long Bash command including single quotes and pipes in a Bash script antcore Linux - General 9 07-22-2009 12:10 PM
Bash script to put log files into single file and email DragonM15 Programming 13 11-08-2007 04:27 AM
Creating Single Instance linux application praj_linux Programming 2 11-19-2004 05:06 AM
Only one instance of bash script... cmfarley19 Programming 7 05-06-2003 02:42 PM


All times are GMT -5. The time now is 04:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration