Quantcast








     

How come cd doesn't work in my shell script?

stackoverflow.com - 2012-04-27 22:07:02 - Similar - Report/Block

I'm trying to make a shell script on my Linux Amazon-EC2 server that will start my Minecraft server but the cd command says it can't find the directory or file when I try to change to the directory the server executable is. Please note I have next to experience with shell script of any kind. Does it have to with permissions in the folder...

How to indicate the current directory of the script not me?

stackoverflow.com - 2013-03-18 10:34:01 - Similar - Report/Block

I have a python script that reads some input from a file that is supposed to be in the same directory of the script: with open('./input1.txt') as file: F = file.readlines() Do_Stuff(F) I usually run the script from other directories (not the directory the script and input files reside), so it raises an IOError that it can't find the inpu...

script unable to find directories/files when running from qsub cluster script

stackoverflow.com - 2010-03-07 18:09:47 - Similar - Report/Block

I'm calling several unix commands and python on a python script from a qsub shell script, meant to run on a cluster. The trouble is that when the script executes, something seems to go awry in the shell, so that directories and files that exist are not found. For example, in the .out output files of qsub I see the following errors: cd: /v...

Run shell script for every file in directory

stackoverflow.com - 2012-04-21 16:34:46 - Similar - Report/Block

I have a bunch of files in a directory all named YYYY_MM_DD -rw-r--r-- 1 root root 480K Apr 21 13:17 2012_04_05 -rw-r--r-- 1 root root 483K Apr 21 13:17 2012_04_06 -rw-r--r-- 1 root root 484K Apr 21 13:17 2012_04_07 -rw-r--r-- 1 root root 480K Apr 21 13:17 2012_04_08 -rw-r--r-- 1 root root 344K Apr 21 13:17 2012_04_09 -rw-r--r-- 1 root ro...

Translating shell script into Windows command shell script (batch)

stackoverflow.com - 2013-06-11 19:19:01 - Similar - Report/Block

I have a shell script which makes directories week_01 to week_09 using a for loop and one another directory called week_10 . I want to translate this shell script into Windows commands using two lines of code? Shell Script: #!/bin/bash for (( Y=1;Y<=9;Y++)) mkdir week_0$Y done mkdir week_10...

Bash script error to run MATLAB

stackoverflow.com - 2012-08-04 01:30:51 - Similar - Report/Block

I'm trying to run a matlab script (ga_opt_main.m) in a cluster. I have to write a job submission file, which is essentially just a shell script. But I have never written a shell script and this is what I wrote #!/bin/bash #PBS -q *queuename* #PBS -l nodes=1:ppn=20 #PBS -l walltime=02:00:00 #PBS -N ga_opt_main module load matlab/R201...

gvim on windows: file pointed to by tempname() does not exist

stackoverflow.com - 2012-05-16 21:34:19 - Similar - Report/Block

I'm trying to use a vim script that issues commands to sas, When i try to run the script i receive an error "Can't open file ..path.. /AppData/Local/Temp/ .. temp file .. " this is the path and file name returned by :tempname() After navigating to the appdata temp files directory, the temp file does not exist. I've tried manually changin...

How can I parse a YAML file from a Linux shell script?

stackoverflow.com - 2011-02-16 09:25:38 - Similar - Report/Block

I wish to provide a structured configuration file which is as easy as possible for a non-technical user to edit (unfortunately it has to be a file) and so I wanted to use YAML. I can't find any way of parsing this from a Unix shell script however.

How to get the control back from expect script to a shell script?

nixcraft.com - 2012-08-03 09:42:21 - Similar - Report/Block

I would like to brief the problem what I am trying and facing. I've a shell script which is the master script 1. From the shell script, I am calling a expect script. 2. Inside the expect script I open a thread and ssh to a machine and trigger another python script. 3. Once the python script is executed completely the control is coming bac...

mfiler4 - 1.2.0 / mfiler4

sourceforge.jp - 2013-06-02 19:43:00 - Similar - Report/Block

昔なつかし2画面のコンソールファイラ(CUIファイラ)、mfiler4のプロジェ クト。(コンソールファイラは国産アーキテクチャがあったころのMS-DOS時代に盛 んに作られていた)。インタラクティブシェルxyzshを組み込み、柔軟にファイルの 管理やスクリプトの実行ができる。 Linux, OSX, cygwin, FreeBSDに対応しています。インストールにはxyzsh-1.4.3以上のイン ストールが必要となります。先にxyzshをインストールしてください。 うりは多彩な表示モード、ソートオプション、findやgrepによる仮想ディレクト リの作成、xyzshシェルとのシームレスな連携です。このソフトからbashやFi nderやnatuilusも開けます。 2pain co...

Use path of source in a scala script file

stackoverflow.com - 2012-04-04 22:34:23 - Similar - Report/Block

I am looking for a way to use the full path of the *.scala file that is executed by scala /path/to/file/file.scala The reason is that within my script I would like to use paths, which are relative to the location where file.scala is saved. So, say I want to call /path/to/file/file_second.scala from inside of file.scala while calling file.

How to run a sql script file using sqlcmd and output to both shell and file

stackoverflow.com - 2012-02-06 19:37:57 - Similar - Report/Block

I'm trying to run a sql script from a file using sqlcmd , using the following command: sqlcmd -S <server> -d <database> -i <input file> -o <output file> -U <user> -P <password> I run my sql file and output to a log file. The problem is this change the output of sqlcmd to the file.. and i want to get t...

evolveStar Join

Creating cron entry on server using ssh login within shell script

stackoverflow.com - 2011-02-17 21:37:32 - Similar - Report/Block

I need to upload a file (bash script) to a remote sever. I use the scp command. After the file has been copied to the remote server I want to create a cron entry in the crontab file on the remote server. However, the file upload and writing the cron entry need to occur within a bash shell script so that I only need to execute the script o...

perl: how to tar and untar all the contents of a directory including files and subdirectories

stackoverflow.com - 2013-02-20 11:03:09 - Similar - Report/Block

I am writing a perl script and at the end of the script I want a tar all the contents of a specific directory(say selected) into a tar file(say selected.tar). Now, I need to untar this file from another perl script in another location to again "selected" directory. This is my sheer requirement and I need to preserve all the permission lev...

Windows Script host

techguy.org - 2013-05-05 19:28:27 - Similar - Report/Block

Hi, About a week ago i started having this error: (The only thing that isn't understandable in this picture is the error because it is in french, so here is the translation for it : " Error:The system cannot locate the resource specified.") It started to get really annoying as it pops up everytime i start up my pc, so i googled the error...

Can a Bash script tell what directory it's stored in?

stackoverflow.com - 2008-09-12 20:39:56 - Similar - Report/Block

How do I get the path of the directory in which a bash script is located FROM that bash script? For instance, lets say I want to use a bash script as a launcher for another application. I want to change working directory to the one where the bash script is located so I can operate on the files in that directory like so: $ ./application...

PHP system("touch ...") - no such file or directory

stackoverflow.com - 2012-05-29 17:13:41 - Similar - Report/Block

I have a basic PHP script like this: <?php system("/bin/touch /root/testfile"); When I run this PHP script from the command line: # php myscript.php I get this: sh: /touch: No such file or directory Also, touch is in the right place: # which touch /bin/touch Is there something I need to setup in my PHP script regarding paths? Because i...

How can I change the temp directory in File.createTempFile?

stackoverflow.com - 2012-04-09 01:48:09 - Similar - Report/Block

I'm basically just doing some tests to figure out a good way to write large amounts of data to a file. I found this great answer Fastest way to write huge data in text file Java and I'm playing around with the script but it seems to be writing to /tmp instead of the directory I'm actually running the program in. This normally wouldn't bo...

Why do calls to the subprocess modele in Python under Windows change the working directory?

stackoverflow.com - 2012-05-17 06:19:55 - Similar - Report/Block

I'm running Python 2.7.3 under windows (installed the binary from python.org). When running in the cmd shell or under MinGW msys, I see odd behavior. If I make a subprocess call with shell=False, the current working directory is maintained. If I set shell=True, the cwd is set to the root of my c: drive. This seems wrong. >>> impo...

Post file from Bash shell script

stackoverflow.com - 2012-03-01 09:05:16 - Similar - Report/Block

I need to post PowerPoint file to ConvertApi online service which convert PPT files to PDF. I am new to Bash shell and don't know how to post PPT file from my local computer. How should I modify line below? curl -i -H "Accept: application/pdf" -X POST http://do.convertapi.com/PowerPoint2Pdf > output...

executing a script in bash and korn

stackoverflow.com - 2012-04-16 12:36:24 - Similar - Report/Block

i have a script that reads a file line by line the code is FILE=commands.txt while read CMD; do echo "$CMD" done < "$FILE" This code is stored in a script file vxm_alarm.sh In Korn shell, this loop works perfectly, when i run the command vxm_alarm.sh . In bash however i get the following error vxm_alarm.sh: syntax error at line 4: `do...

If-statement to use only particular file names in R

stackoverflow.com - 2012-05-14 13:40:42 - Similar - Report/Block

I am writing a function which would get all files from a particular directory and then execute some commands on those files that match my criteria. One of the criteria is that the file should not have the name "test.csv", and the other that it shouldn't be a png-file. Now, the thing with test.csv works fine, but I don't get R to ignore pn...

excel vba wait for shell command to complete

stackoverflow.com - 2013-04-11 14:46:05 - Similar - Report/Block

So I'm running a simple shell command in Excel VBA that runs a batch file in a specified directory like below: Dim strBatchName As String strBatchName = "C:\folder\runbat.bat" Shell strBatchName But the issue is sometimes the batch file might take longer on some computer to run, and there are proceeding VBA code that is dependent on the b...

shell to find a file , execute it - exit if 'error' and continue if ' no error'

stackoverflow.com - 2012-07-21 23:07:41 - Similar - Report/Block

I have to write a shell script and i don't know how to go about it. Basically i have to write a script where i'd find a file ( it could be possibly named differently). If either file exists then it must be executed, if it returns a 0 ( no error), it should continue the build, if it's not equal to 0 ( returns with error), it should exit. I...

linux shell script: getting filename from a user input string

stackoverflow.com - 2012-03-10 19:50:17 - Similar - Report/Block

I would like to write a shell script in which I'll take a line input from user,which will contain some xxx.cpp as filename. I want to get that "xxx" in another variable. if user give input as: some params path/to/file/xyz.cpp more p/ara/ms I want to get xyz which occurs before".cpp" and after last occurance of "/" before ".cpp"...

Missing tk.h and tcl.h files when installing VRip

stackoverflow.com - 2012-03-10 20:19:08 - Similar - Report/Block

I am trying to compile VRip in Ubuntu 10.04, using the site http://graphics.stanford.edu/software/vr ip/guide/ as a guide. It relies on installation of Tcl and Tk -- I have acquired the latest versions of these from the synaptic package manager. When I write "make depend", I get the error: In file included from vripInit.cc:30: vripInit.h:...

Opening a winform from an IronPython shell without blocking the shell or the form

stackoverflow.com - 2012-04-18 10:52:19 - Similar - Report/Block

I'm starting a winform from an IronPython shell. My form is then calling a script which runs for some hours and writes output to the shell. While the script is running, the GUI is blocked (I cannot hit any buttons or minimize it). I tried these approaches: When I open the form with ShowDialog(), the form stays in front. I cannot put the p...

Errors when loading terminal

stackoverflow.com - 2012-04-08 04:42:13 - Similar - Report/Block

Every time I run a new terminal window (before I do a single thing), I am greeted with these messages: env: bash: No such file or directory env: bash: No such file or directory env: bash: No such file or directory env: bash: No such file or directory env: bash: No such file or directory -bash: grep: command not found -bash: tar: command n...

Guaranteed atomic move of folder

stackoverflow.com - 2012-03-23 14:12:48 - Similar - Report/Block

I have a script that runs every minute at XX:00. The script loops over all subfolders in a given directory and performs operations on the files inside; folder=/path/to/directory #Starting directory someerror=0 #Did we have an error? #CD to directory. Does it even exist? cd $folder RETVAL=$? [ $RETVAL -eq 0 ] && echo Success changi...

How to run Linux shell script on windows environment

stackoverflow.com - 2012-05-14 12:23:48 - Similar - Report/Block

I have housekeeping script which is running on Redhat operating system. I have a requirement where i want to run the same script in the Windows environment. So i have 3 options Write a new script for windows Convert Linux script in to windows script using some too. Use Cygwin and run the script without making any change to the linux scrip...

How to route the Python script output to a file

stackoverflow.com - 2013-05-05 12:32:32 - Similar - Report/Block

I have a following script in python. for i in range(10000): print i Above piece of python code prints the value of i from 0 to 9999 on the console. Now I would like to route the output of the script directly to an external file. On linux, I can get it done using the following command $ python python_script.py > python_out.txt What is th...

using grep in a script which prompt user for input

stackoverflow.com - 2013-02-28 11:20:10 - Similar - Report/Block

I have written one shell script which ask for some username and password from standart input. Once username and password is typed there is a output depending upon the parameters passed in the script. Say my script name is XYZ.ksh. Now my problem is that users of these script want to use want to use this script in conjugation with other sh...

How to execute and encrypted and password-protected bash script?

commandlinefu.com - 2013-03-10 10:34:12 - Similar - Report/Block

$ echo "ls" > script.bash; gpg -c script.bash; cat script.bash.gpg | gpg -d -no-mdc-warning | bash echo "ls" > script.bash; This is my script, a simple 'ls'. gpg -c script.bash; Here I encrypt and passord-protect my script. This creates file script.bash.gpg. cat script.bash.gpg | gpg -d -no-mdc-warning | bash Here I open file script.bash...

Qt Creator can't find headers (says: "No such file or directory")

stackoverflow.com - 2012-03-05 20:48:33 - Similar - Report/Block

How can I tell Qt Creator 2.4.1 (based on Qt 4.7.4 32-bit) where to look by default for header files? When I open a C file in Qt Creator and say #include <stdio.h> it underlines the line and says stdio.h: No such file or directory I would like to tell it to look for headers in a directory of my choice; how do I do this? Update I gu...

Playing AVI Files In OpenGL

gamedev.net - 2012-08-13 10:40:16 - Similar - Report/Block

hi i am using the code "" written by Jeff Molofee (NeHe). when i am building on RHEL 6.1 i am getting this problem. g++ -g -O2 -Wall -I./ -I/usr/local/include -lglut -lGL -lGLU -laviplay lesson35.cpp -o lesson35 lesson35.cpp:25:29: error: avifile/avifile.h: No such file or directory lesson35.cpp:26:29: error: avifile/version.h: No such fi...

How to use subprocess.call without shell=True

stackoverflow.com - 2012-05-31 04:19:20 - Similar - Report/Block

The documents recommend against using subprocess.call with shell=True , however when I try to do something as simple as call(['convert']) I get an error: Must specify a file system When I run the same command via cmd.exe, I get C:\Users\Mark>convert Version: ImageMagick 6.7.3-6 2011-11-10 Q16 http://www.imagemagick.org etc., i.e., it...

applying R script prepared for single file to multiple files in the directory

stackoverflow.com - 2012-04-02 21:03:23 - Similar - Report/Block

I have prepared a r script and trying to apply the same codes in multiple files currently working with 5 sample files (but trying to learn to work with files over 100) in the directory to learn how to work with multiple files. Sorry for the quality of codes I have written as I am currently learning R and I am sure there are much better an...

CD command not working as supposed to

stackoverflow.com - 2012-04-06 04:37:47 - Similar - Report/Block

Look at the following code: ECHO A2 MKDIR -v /tmp/"My Batch Script File Assignment" ECHO A3 CD "/tmp/My Batch Script File Assignment" can anyone tell me why the cd command under ECHO A3 isn't working. The following PWD command reports that the working directory changes to /tmp. But I am wanting to changing to the "My Batch Script File As...

scan a folder with a date passed as a parameter

stackoverflow.com - 2012-07-19 14:06:50 - Similar - Report/Block

How can i do a shell script for do this: The call of the script will see the "/DataFolder" to list all files *.INI with the date passed as a parameter. The result should if possible retain only the file name and time the file was changed and the list must be sorted in ascending order. If no parameter is passed, we take the current date...

Does "cp -r" behave oddly in bash?

stackoverflow.com - 2012-08-03 05:32:27 - Similar - Report/Block

I'm working on a bash script to bootstrap a cloud server with the puppet client so that I can create a boot image, but I'm getting weird behavior from a simple "cp -r" where the contents of my source directory are being copied, but the parent directory is not being copied. For example, if I had /root/puppet/file1, and I issued a cp -r /ro...




dialogShowMessage!

Fill out the form you see below. Registration is free, fast and simple.
If you are already registered, sign in page login.


Web Site :
Required Field
First Name :
Required Field
Last Name :
Required Field
Email :
Required Field
Sex :
Required Field

evolveStar.com is free for ever !


evolveStar.com provides a search engine that allows you to gather information to write their own blog.


evolveStar.com enhances the sources displaying the logo of the site.


If you want to remove your site or you believe a site listed infringes copyright, please report it to: info@evolvestar.com


Specifies the subject copyright violation and the url of the page


evolveStar.com respecting the law DMCA (Digital Millennium Copyright Act) will immediately remove whatever its merits.


Next will be effectual and relevant checks.







Who We Are Partner Advertising Contacts Privacy terms Help & FAQ

© Copyright 2010-2017 Fabrizio Fichera. All rights reserved.