script under cygwin suddenly says command not found


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting script under cygwin suddenly says command not found
# 1  
Old 09-19-2012
script under cygwin suddenly says command not found

Running bash in cygwin under 2003 Server. I run about 6 shell windows. Every now and then when I check the machine, all of the scripts are scrolling and returning /usr/bin/whatever: command not found.

I checked the event log for a windows event that would cause it, but there was nothing. I would say that it happen once in 3 weeks of running. CPU is minimal, lots of memory. Machine is serving files via ftp and running my script to parse files. No heavy activity.

Thanks.Smilie
# 2  
Old 09-19-2012
windows sometimes reacts badly to running lots and lots of external commands in too short a time, even under good conditions. If you reduce the number or at least the speed at which you use shell externals, there will be less chance of error. Can you show the script?
# 3  
Old 09-19-2012
what do you mean by external commands, calling another script, running a windows parser (exe), bash commands or all of the above?
# 4  
Old 09-19-2012
Many 'bash commands' are not actually bash commands. A few like echo and printf are builtin, but cp, mv, ls, awk, sed, cut, and all of those are not 'bash commands'. They're exe files which must be run individually.

So, yes. Probably all of the above.
# 5  
Old 09-19-2012
M$ Windows Server 2003 is unstable (even after Service Pack 2). When posting Microsoft Windows questions, please post the exact version. Run the winver command.
Maybe try scheduling a reboot once-a-week. We do this because Windows Server 2003 rarely stays up for 4 weeks without a hang or a crash.

As @Corona688 requested, please post the script concerned and the exact method of invoking the script. Sometimes the simple addition of a sleep command can reduce the impact of recursive scripts.
If you have the system set for "Automatic Updates" beware that it will reboot whenever Microsoft feel like it.
# 6  
Old 09-19-2012
what's the strategy behind slowing things down, because I'm grepping and awking, parsing, copying, etc. Switch to Linux
# 7  
Old 09-19-2012
The strategy behind slowing things down is because Windows is slow in releasing System Resources.
If you cannot post any detail about this problem, then we must close the thread.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File not found when using cygwin

files="UserRightAssignment.txt" echo $files echo '1.1.1.2.2.1;' `grep -ai '^Modify an object label' $files`Hi there, I got such an output when using unix,please advise 1.1.1.2.2.1; : No such file or directoryxt I am using sh ura.sh (3 Replies)
Discussion started by: alvinoo
3 Replies

2. Shell Programming and Scripting

Getting Command not found error Even though Script is working fine

Hi friends, I am using below script to do some work. But even though script is working fine but while executing it i am getting command not found error. :( Here is the script :- #!/bin/sh Names="name.txt" ###main##### for LINE in `cat ${Names}` do ... (3 Replies)
Discussion started by: harpal singh
3 Replies

3. Shell Programming and Scripting

When i am trying to execute export command within a shell script it is saying command not found.

I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found" My code is as follows: -------------------------- #!/bin/sh user="test" DIR="/bldtmp/"$user VIEW="test.view1" echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies

4. Shell Programming and Scripting

help a beginner, expect script, command not found

hi, i have a problem with my expect script, here is MyScript: #!/usr/bin/expect set pass set c set command spawn sudo $command expect "assword" send "$pass\r" expect eof My problem is that when i execute MyScript with the command : "./MyScript mypassword apt-get_install_git"i get... (6 Replies)
Discussion started by: gongotar
6 Replies

5. Shell Programming and Scripting

Command not found errors when running csh script

I am trying to find the number of files whose name starts with uni. Below is the code but it is giving error. :confused: #!/bin/csh FILES_NAME ='files_list'; FILE_NAME_PATTERN = 'uni*'; NO_OF_FILES; ls -l $FILE_NAME_PATTERN > $FILES_NAME ; NO_OF_FILES = `wc -l $FILES_NAME`; echo... (3 Replies)
Discussion started by: hiten.r.chauhan
3 Replies

6. Shell Programming and Scripting

Command not found in shell script - stumped for 4 days

Hello, I like to begin with :wall:.. literally... It has been 4 days and I have no idea how to fix it. Environment - AIX 5.3 I wrote a script to call on ssh to log into another box via PKA to do something else. If I run the script on the terminal, it works 100%. If the SAP customised... (11 Replies)
Discussion started by: plonkagain
11 Replies

7. Shell Programming and Scripting

rm:command not found in linux Bash shell script

Hi All, Linux lxs3er06 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux Issue: While executing shell scripts in bash shell, following error messages are thrown: rm:command not found On doing little investigation, I added '/bin' to $PATH and on doing echo... (9 Replies)
Discussion started by: a1_win
9 Replies

8. Shell Programming and Scripting

Script call : head: command not found

Hi, i am launching a script which open a ssh connexion to a cluster's node. Once on the node, the script calls the problematic command head and wc. I receive a message error as follow which come from two different scripts : line 31: head: command not found line 18: wc: command not found ... (6 Replies)
Discussion started by: masy1800
6 Replies

9. UNIX for Dummies Questions & Answers

Cygwin bash script and read command

Hello everyone, I am struggling a bit with a batch script that I need to run in cygwin. I work in winXP and I had to write some awk scripts to do some file manipulation, and now I would like to automate the process by just running a batch file so that my colleagues can use it easily. Now, the... (2 Replies)
Discussion started by: Teroc
2 Replies

10. Windows & DOS: Issues & Discussions

Found by accident: Cygwin tips that still work (most of them)

The link: Cygwin Tips by zzapper Linux Like Environment for Windows The tip I found most useful: Scroll down to this line: It describes how to add useful Windows-side folders to your Cygwin install by changing them into POSIX paths, accessible via cd /<shortcutname> but invisible to... (0 Replies)
Discussion started by: SilversleevesX
0 Replies
Login or Register to Ask a Question