When I get to the step:
touch README
I get the error
'touch' is not recognized as an internal or external command, operable program or batch file.
What does this mean?
I'm in Win 7 Home Premium command prompt.
Make sure you're working in git bash, not cmd.
The touch command updates the last-modified timestamp of the file to the current time, or if the file doesn't already exist, creates an empty file with the given name. This command does not exist (by default) in Windows, which is the reason you get that error message.
To get past this step, you can create a file called README in whatever way you feel most comfortable with. For example, you could use notepad.exe if you have no better alternative available.
Use this code in CMD and then touch your file
npm install touch-cli -g
Related
I just installed Git bash in order to run a UNIX command. I am trying to recreate a project starter which is using UNIX; it seemed there was no way for Windows to run a "grep" command without using something like Git bash.
I CD into the project folder directory
mboyl#DESKTOP-8R019P7 MINGW64 ~/lei_broker (master)
Then I run my command
$ heroku config:set SANITY_READ_TOKEN=$(grep SANITY_READ_TOKEN .env.development)
And am met with the error
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
What is going on here? 'C:\Program' is not included in my command.
My initial troubleshooting has recommended using a shell besides Git bash or setting an environment variable. My technical chops are limited, so if there is a simple Linux/UNIX syntax error I am making, please advise.
Matt
Posting as an answer since I need 50 Reps.
While I don't know what's inside the file .env.development, why not wrap all Windows paths with single-quotes & try?
I installed Strawberry Perl to run the rouge program in Windows. But when I want to run my program, I receive an error message that you can see on the image:
The system can't find the path specified.
My code is attempting to run "ROUGE-1.5.5.pl" but i think the system can't find this file. So I think maybe I don't initialize the path correctly?
I change my code to :
#!/usr/bin/perl
use Cwd;
$curdir=getcwd;
$ROUGE="..\ROUGE-1.5.5.pl";
chdir("sample-test");
$cmd="$ROUGE -e ..\data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -a DUC2002-ROUGE.in.26.spl.xml > ..\sample-output\output.out";
print $cmd,"\n";
system($cmd);
chdir($curdir);
and i receive this error:
Missing braces on \o{} at C:\runROUGE-test.pl line 7, near "$ROUGE" Execution of C:\runROUGE-test.pl aborted due to compilation errors.
As per the screen shot, you are attempting to run \ROUGE-1.5.5.pl where you probably want it without the spurious backslash (or with ..\ROUGE-1.5.5.pl if the parent directory is not on your PATH).
Similarly, you probably want the output in sample-output\output.out, or even just output.out, not \sample-output\output.out unless you specifically have a folder C:\sample-output for this purpose.
The backslash is significant; it is the absolute path to the root (of the current drive, on Windows). ..\ is the relative path to the parent folder.
Why are you writing a Perl script to run a Perl script, though? Either a simple batch file, or copy/pasting the command directly at the DOS prompt would seem like a less roundabout solution.
The problem is that when you are outputting the contents of the program to the file output.out in folder sample-output, the sample-output folder does not exist.
Command Prompt will not create the folders for you, only the files. Try creating a directory first called "sample-output" (In your drive root) such that the path resolves to something like C:\sample-output and run it again.
If the same problem results, try using an absolute path such as C:\sample-output\output.out instead.
How does Python (or MonkeyRunner) locate imported modules?
I previously asked about an error I get when running a monkeyrunner script from Git Bash. I still haven't resolved the issue and decided to try running it from the Windows 7 command line. I cd to the directory containing my .py files and run
> monkeyrunner screenshots.py
Can't open specified script file
Usage: monkeyrunner [options] SCRIPT_FILE
-s MonkeyServer IP Address.
-p MonkeyServer TCP Port.
-v MonkeyServer Logging level (ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF)
screenshots.py is indeed in the current directory. Why can't monkeyrunner find it? What do I need to do to fix this to run on Windows 7?
did you try giving full path to your screenshots.py.
monkeyrunner C:\folder_location_to_your_file\scrrenshots.py
There is an easier way to call monkeyrunner script if the cmd is in the directory that contains your script:
monkeyrunner "%cd%\your_script.py"
Make sure you put the "" marks.
I installed Sencha SDK and Sencha command on my mac-mini and done with some sample app.. but suddenly after some time when I tried to run sencha command on terminal, I got the response as '-bash: sencha command not found', I don't know why this was happened. Earlier I didn't find such type of response but now I got this error. Please tell me what are the possible scenarios for this thing to be happened.. Thanks for your help
Alens-Mac-mini:touch-2.2.0 SenchaTools$ sencha
-bash: sencha: command not found
You should procede that way:
Verify if this command is contained in PATH. PATH is an environment variable holded by bash and initialized when a new user is logged in (.bash_profile file for all user and the corrispective into home for single user). So check what echo $PATH told you and verify if this command is contained into those folder
Probably, from step 1, the answer will be "No, it isn't". So you have to procede this way: use whereis command to search this command (that will be an executable script) and once you find it, you have two possibilities: one is to use it directly by specifying full path (returned from whereis command).
If you want to run simply it with sencha -arguments you have to add executable path returned by whereis ($PATH=$PATH:/returned/path/by/whereis) into file .bash_profile
In that way you should be able to execute your command from any "point" in your filesystem
The Sencha installer expects you to use bash as shell. It fails, if you use any other (like the nice zsh). You need to copy the content of .bash_profile to your shell startup-file (.zprofile in my case), save it and open a new terminal window.
Add PATH and VAR manually in .bash_profile file at the root of your user folder,
export SENCHA_CMD_3_0_0="/Users/you/Path/To/Sencha/Cmd/3.0.0.XXX"
export PATH=/Users/you/Path/To/Sencha/Cmd/3.0.0.188:$PATH
Find out more about this issue at sencha forum https://www.sencha.com/forum/showthread.php?245243-Command-not-found-mac-OSX-mountain-lion
I am quite new to the Mac Terminal environment.
I donwloaded sqlplus (which is recognised as a UNIX executable program) and then in Terminal I do cd a few times until I arrive in the folder I put this in (\Applications\instantclient_10) in this case.
When I type 'ls' I see a listing of all the files including the sqlplus. So I would then expect to simply type at the Telnet prompt 'sqlplus' and then this would start but instead keep getting
-bash: sqlplus: command not found
This is problem one.
I have now downloaded MySQL and again, when I go to the correct folder (\Library\StarupItems\MySQLCOM) and I type 'ls' I see my files (including MySQLCOM) but when I come to try to 'run' this by simply typing 'MySQLCOM' again the message is:
-base: MySQLCOM: command not found
What am I doing wrong?
Thanks
To run binary/executables in current folder you need to prefix them with ./
./sqlplus
The idea here is that you want to force execution of local file and not run it accidentally. Imagine app that would put ls binary into it's folder and it would automatically run if did ls in that folder.