Execute script on the fly


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Execute script on the fly
# 1  
Old 08-22-2014
Execute script on the fly

Hi all,
I am calling a zsh script from batch file .

This zsh just removes the trigger file in a particular directory.File name is passed as a parameter from the batch file Problem is this batch is called in multiple other batch files and sometimes system says file cant be used as it is used by other program .
Can you please let me know whether we can craete a zsh file on the fly and execute and remove that. Trigger file names are unique

Thanks
DJ
# 2  
Old 08-22-2014
Yes, we can
# 3  
Old 08-22-2014
How do we do ? Any sample script you have ?
# 4  
Old 08-22-2014
I can't imagine why a shell script should not be useable by several processes. To enlighten me, please post the directory structures that you use and the error messages that are issued.
# 5  
Old 08-22-2014
Acces Variable from expect-Script in bash-Script

Hi all,

I have a little problem with a expect in a bash Script.
The hull of my script:

Code:
#!/bin/sh

( expect -c '
set a \"eee\";    # the variable a
' )
echo $a;          # using the variable out of the expect script

I would like to use the variable out of the expect script(in bash), but it doesn't work.
I already tried "export" and "global" but nothing works.
Could someone help me please?
Moderator's Comments:
Mod Comment This unrelated discussion has been moved to a new thread.

Last edited by Don Cragun; 08-22-2014 at 05:33 AM.. Reason: Note new thread...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

Creating An Executable On The Fly...

Hi all... Had an idea tonight which could really enhance shell scripting for me. Yes I am aware there could be difficulties but...... Creating a C script inside the shell script to do a task, (a simple text print to stdout in this example), compiling it on the fly, making sure it is... (4 Replies)
Discussion started by: wisecracker
4 Replies

2. Shell Programming and Scripting

Shell script to accept user input on the fly

I want a shell script that accepts user input simultaneously when performing other tasks. Example: A shell script should echo some messages on the console and when the user presses some keys it should respond to that action. say, when user presses the key A - more information should be printed... (2 Replies)
Discussion started by: Arun_Linux
2 Replies

3. HP-UX

Compress dbexport on the fly

Hi, I have an old HPUX 10.20 server running Informix 7.23 I need to dump the database to get it off that hardware before it dies. Unfortunately there is insufficient local diskspace to do so. I have set up a linux box with sufficient disk onto which I can export the database. Having... (1 Reply)
Discussion started by: fella
1 Replies

4. Programming

CGI Perl script to execute bash script- unable to create folder

Hi I have a bash script which takes parameters sh /tmp/gdg.sh -b BASE-NAME -n 1 -s /source/data -p /dest/data/archive -m ARC gdg.sh will scan the /source/data and will move the contents to /dest/data/archive after passing through some filters. Its working superb from bash I have... (0 Replies)
Discussion started by: rakeshkumar
0 Replies

5. What is on Your Mind?

The Only Way To Fly !

This is great! Lqh8e2KYIrU (8 Replies)
Discussion started by: Neo
8 Replies

6. Solaris

Disable IPMP on the fly

Wats would be the best way to disable link based IPMP on the fly without loosing network connectivity ? (6 Replies)
Discussion started by: fugitive
6 Replies

7. Shell Programming and Scripting

Script to burn DVD on the fly?

Hi folks, One DVD Writer installed on PC To duplicate Data DVD or DVD Installer I run following steps; 1) $ dd if=/dev/dvd of=image.iso bs=2048 to create an ISO image 2) Remove the DVD disc on the tray and insert a blank DVD disc for burning. Then run; (0 Replies)
Discussion started by: satimis
0 Replies

8. Shell Programming and Scripting

script execute or no execute

o hola.. Tengo un script que se ejecuta bajo una tarea del CronJOb del unix, tengo la version 11 de unix, mi script tiene un ciclo que lee unos archivos .txt luego cada uno de esos archivos debe pasar por un procedimiento almacenado el cual lo tengo almacenado en mi base de datos oracle 10g,... (4 Replies)
Discussion started by: Kespinoza97
4 Replies

9. UNIX for Dummies Questions & Answers

mv and compress on the fly

I want to move and compress a big export file. Like mv file_exp /filesystem/file_exp |compress The file system is too small to compress and move with 2 steps. What is the best command for me. I'm running solaris. :confused: (1 Reply)
Discussion started by: simquest
1 Replies

10. UNIX for Dummies Questions & Answers

Rename files on the fly

Hi everyone, I am sort of new to shell scripting, I have a bunch of files that begin with 'blah' and I want to rename those files with something different (renamedFile1, renamedFile2, renamedFileN). I don't want to go through each file and rename them with the mv command. Could I just use a for... (4 Replies)
Discussion started by: kcor
4 Replies
Login or Register to Ask a Question