Sponsored Content
Top Forums Shell Programming and Scripting bash script won't execute (Mac) Post 302399901 by thillai_selvan on Tuesday 2nd of March 2010 12:48:23 AM
Old 03-02-2010
You can use the following way also to run the bash script

Code:
. script_name.sh

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

loop does not execute in bash script?

I have a very basic bash shell script, which has many "while... done; for .... done" loop clauses, like the following ~~ #!/bin/bash while blablalba; do .... done < /tmp/file for line in `cat blablabla`; do grep $line /tmp/raw ; done > /tmp/1; while blablalba2; do .... done <... (2 Replies)
Discussion started by: fedora
2 Replies

2. UNIX for Dummies Questions & Answers

how to execute sh script in bash shell via crontab

hello. we are porting over from HPUX Shell to Linux. my default shell is bash so i can no longer schedule to execute a sh script in crontab. can anyone pls help me out? I searched the site but didnt find any details. thanks! (1 Reply)
Discussion started by: jigarlakhani
1 Replies

3. OS X (Apple)

Why won't the at command work in Mac OS X?

I typed: echo "echo hi > at_log.txt" | at now +1minute to test the at command on my terminal. I got the message: job 8 at Thu Feb 25 18:42:00 2010 I waited for a minute but nothing happened. I tried listing at_log.txt, but it said there was no such file. Am I doing something... (2 Replies)
Discussion started by: Ultrix
2 Replies

4. Shell Programming and Scripting

Execute ssh commands through bash script

Hi all! I am trying to write a script that will check if a certain directory is available at several different nodes and then do stuff in it ..... On the beginning of the script I give as a variable the directory and the number of the nodes and then I loop like this: for... (3 Replies)
Discussion started by: idet2
3 Replies

5. Shell Programming and Scripting

How to execute a bash script

Hi All, I am trying to write a simple bash script. rm -f File1 I saved this as test.sh Now when I want to execute it, I type ./test.sh It gives me error "command not found" What I am doing incorrect here? Do I have to add anything in script like #!/bin/bash (5 Replies)
Discussion started by: palak08
5 Replies

6. UNIX for Dummies Questions & Answers

Bash script to execute a program to rename files

I just can't figure it out , so please just give me a pice of advise how to: The existing Linux program foo2bar takes as its only argument the name of a single foo file and converts it to an appropriately-named bar file. Provide a script that when executed will run foo2bar against all foo... (4 Replies)
Discussion started by: raymen
4 Replies

7. 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

8. Shell Programming and Scripting

Nested double quotes won't work in my bash script?

In a bash script I have: LSCMD="find /project/media/ -mindepth 2 -maxdepth 2 -name \"files*pkg\"" ALL_PACKAGES=$( $LSCMD | sort 2>/dev/null) But I get nothing returned. It's just all blank. If I run the find command in a terminal, I get dozens of hits. I figure it's the way how I'm... (3 Replies)
Discussion started by: superbbrr
3 Replies

9. UNIX for Beginners Questions & Answers

Bash script won't run because hardware won't produce display

Can anyone offer any advice on how to modify the script below to work on a new system we have, that has no graphics capability? We admin the system through a serial RAS device. I've tried running the below script through the RAS and through an ssh -X session. It failed with something like "GTK... (3 Replies)
Discussion started by: yelirt5
3 Replies
FDF_ADD_DOC_JAVASCRIPT(3)						 1						 FDF_ADD_DOC_JAVASCRIPT(3)

fdf_add_doc_javascript - Adds javascript code to the FDF document

SYNOPSIS
bool fdf_add_doc_javascript (resource $fdf_document, string $script_name, string $script_code) DESCRIPTION
Adds a script to the FDF, which Acrobat then adds to the doc-level scripts of a document, once the FDF is imported into it. PARAMETERS
o $fdf_document - The FDF document handle, returned by fdf_create(3), fdf_open(3) or fdf_open_string(3). o $script_name - The script name. o $script_code - The script code. It is strongly suggested to use for linebreaks within the script code. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Adding JavaScript code to a FDF <?php $fdf = fdf_create(); fdf_add_doc_javascript($fdf, "PlusOne", "function PlusOne(x) { return x+1; } "); fdf_save($fdf); ?> will create a FDF like this: %FDF-1.2 %aaIO 1 0 obj << /FDF << /JavaScript << /Doc [ (PlusOne)(function PlusOne(x) { return x+1; } )] >> >> >> endobj trailer << /Root 1 0 R >> %%EOF PHP Documentation Group FDF_ADD_DOC_JAVASCRIPT(3)
All times are GMT -4. The time now is 08:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy