How to pass argument to shellscript executing g++ ? Hardware and Software Linux and Unix by silentbang … error output from compiling a C++ file using shellscript. When I pass argument to shellscript , for ex: argument is the name of…] doesn't work So I decided to call only the shellscript(without argument) and in that : [CODE]g++ *.cpp 2>… Can include php file into shellscript file Programming Web Development by gurusubramaniam Hi.. I want to run a php file every 5 seconds. So that i used shellscript file. But Shellscript file not accept php coding. Can i include php file into Shellsript file? or can i write the php code in Shellscript file? Re: How to pass argument to shellscript executing g++ ? Hardware and Software Linux and Unix by JasonHippy … the full paths to each. So if you had the shellscript in a directory called 'scripts' in your home directory and… How to use multiple interpreter in shellscript? Programming Web Development by gurusubramaniam Hi... I want to use the multiple interpreter (like #!/bin/bash and #!/usr/bin/php) in a single shellscript. Is it Possible? how to use array in shellscript Programming Software Development by vinay7868 how to use array in shellscript...how array r declared and used can anybody reply me...pls open console and interact with user while running shell scrip Programming by khaled_jawaher … scriptDirectory = new File("src/main/resources/"); final String shellScript = "./script.sh"; ProcessBuilder pb = new ProcessBuilder(); pb.…command("/bin/bash","-e",shellScript); pb.directory(scriptDirectory); p=pb.start(); when i change … Re: open console and interact with user while running shell scrip Programming by RudyM … be off): `Runtime.getRuntime().exec("/bin/bash -e " + shellscript);` More info [HERE](http://docs.oracle.com/javase/7/docs… kwrite and gedit errors Programming Software Development by marco83 hi, just stumbled on a problem: a friend wrote her shellscript in mandrake kwrite which also uses bash, we tried to run it on fedora core 2 gedit but won'nt run as it reads errors on curly braces and has unexpected end of file errors. It runs perfectly on mandrake but not on fedora. Why is this? marco Shell scripting Programming Software Development by Clockowl Does anyone know if it's possible to create a shellscript that knows when it's fopen()ed? So when any process fopens() it, it can take an action? Thanks in advance, bottom: 0px doesn't get the div to the bottom Digital Media UI / UX Design by k2k …;</td> <td><a href="shellscript.php">Shell Script</a></td… Script to Change file permissions Programming Software Development by grvs … like this (code mixed with psuedocode is written below) [code=shellscript] #GrantExPer #Usage: GrantExPer <filename> str1='ls -la ' #first… usb detection Programming Software Development by mmnewbee Hi I,ve recently joined daniweb and was wondering if you guys might help me in writing a shellscript that automatically detects whether a flashdrive has been inserted into a usb port and recursively searches all folders deleting any .exe files it encounters. Thanx. Re: usb detection Programming Software Development by gerard4143 [QUOTE=mmnewbee;1185289]Hi I,ve recently joined daniweb and was wondering if you guys might help me in writing a shellscript that automatically detects whether a flashdrive has been inserted into a usb port and recursively searches all folders deleting any .exe files it encounters. Thanx.[/QUOTE] A question...What operating system? connecting database Programming Software Development by harsha956 hi i am harsha and i want a linux shellscript for connecting a mysql database and queries to copy a blob file from database and i need to parse that file and replace with other file can u pls help me its urgent oracle and shell scripting Programming Software Development by lena1990 needed help how can i connect to my oracle database using shell script and how can i assign particular value in table to a variable defined in shellscript and i use sqlplus but i get error Migrate from FTP to SFTP Programming Software Development by nivarshn … scheduled job (via Control-M) on server that is executing shellscript everyday. so how to setup ssh password less login to… Re: gdb help Programming Software Development by Nick Evan How about using a shell script to start GDB in a loop? Redirect the output to a file. [code=ShellScript] for (( i = 0 ; i <= 10; i++ )) do gdb yourfile > outputfile done [/code] Re: Zipping folders recursively Programming Software Development by amanuensis … shell script that will do the zipping. I have a shellscript at the moment that will zip a selected folder and… Re: This is the error i get when i run my script: Unmatched ` Programming Software Development by sknake …] At that point it isn't interpreting that line as shellscript but rather piping the contents to a file which is… Re: A fatal error has been detected by the Java Runtime Environment: Programming Software Development by stephen84s …/ Added the following lines to my $HOME/.profile file [code=shellscript] PATH=/opt/jdk1.6.0_16/bin:$PATH export PATH [/code… Re: validating with /etc/passwd and /etc/shadow Programming Software Development by Korakos … i still dont know how to create a user using shellscript and without the commands that are there specifically for that… Re: Need Shell script questions Programming Software Development by IIM …;f3 *cat f1>f2<f3 4. Write a shellscript to execute a set of codes automatically on a particular… Re: Deleting symlinks Hardware and Software Linux and Unix by JasonHippy … l -execdir rm {} \; Or you could put it into a shellscript: #!/bin/sh find /path/to/folder/ -maxdepth 1 -type l… Re: How to pass argument to shellscript executing g++ ? Hardware and Software Linux and Unix by silentbang thank you. I follow and it works with command line input directly. But I forgot to inform that last time I used Java to call the command (also what I wanna ask last time): [CODE] String cmd = "./controller.sh data" ; //workDir is the directory string Process pr = Runtime.getRuntime().exec(cmd , null, workDir);[/CODE] and Java did … Re: Can include php file into shellscript file Programming Web Development by pritaeas Sure, just use `php path/to/your/script.php` Re: How to use multiple interpreter in shellscript? Programming Web Development by cereal I'm afraid you cannot do that in the same script because the shebang needs to be in the first line, but you can separate them: #!/bin/bash a=$1 echo "hello $a from bash " ./script.php $a and inside script.php #!/usr/bin/php <?php $a = $argv; echo "and hello $a[1] from php\n"; ?>… Re: how to use array in shellscript Programming Software Development by Watael don't you have a man page about the shell you're using (that is? bash? ksh? what version?)? didn't you make some tests? show what you've tried, and where you're stuck. Is it Possible to Run a shellscript file using Java Program Programming Software Development by babusek Hi Folks, Here is the Question for u ? ;) Is it possible to a Run a [B]Unix Shell Script File Using java Program [/B](ex: using Runtime ,process class etc....);) my Shell Script File Contains So many Commands (like find ,sed,awk,convert etc..) [B]----->[/B] I would like to run this shell script file using Java program in Windows … Re: open console and interact with user while running shell scrip Programming by JamesCherrill ProcessBuilder was intended as a replacement for Runtime exec, so maybe that will work, but it is a step backwards. Re: kwrite and gedit errors Programming Software Development by alc6379 I don't think it would really matter on that-- how does it run in the actual bash shell? If I were you, I'd run it in bash, and then see what errors, if any, occured. Fix them, and you'll be in good shape on either editor. I'd hope that gedit or kwrite, either of them, would use the actual interpreter from the bash shell, so it would all be the…