Sponsored Content
Full Discussion: Not able to run shell Script
Top Forums Shell Programming and Scripting Not able to run shell Script Post 302872851 by nitinupadhyaya8 on Sunday 10th of November 2013 09:54:55 AM
Old 11-10-2013
Not able to run shell Script

Hi,

1) When I run a script name myscript.sh, I do not see any error nor does the script get executed. What can be the possible reason? This was an interview question asked recently

eg.

sh myscript.sh

2) I manually check if my directory is being updated every 5 mins. How can I automate this shell scripting?

Last edited by nitinupadhyaya8; 11-11-2013 at 01:46 AM.. Reason: Got a reply to change the subject
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run unix commands in a new shell inside a shell script?

Hi , I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell. So scenario is that - I need to have one shell script which is ran as a part of crontab - in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies

2. Shell Programming and Scripting

How to Run a shell script from Perl script in Parent shell?

Hi Perl/UNIX experts, I have a problem in running a shell script from my perl script (auto.pl). I run the perl script using perl auto.pl from the shell prompt The shell script picks the files in "input" folder and procesess it. The shell script blue.sh has this code. export... (16 Replies)
Discussion started by: hifake
16 Replies

3. Shell Programming and Scripting

Help need to make a shell script run for ffmpeg vhook watermaking in shell

i have a small problem getting a batxh shell script to run in shell this is the code the problem seems to be centered around the ffmpeg command, something maybe to do with the ' ' wrapping around the vhook part command this is a strange problem , if i take the ffmpeg command and... (1 Reply)
Discussion started by: wingchun22
1 Replies

4. Shell Programming and Scripting

How to run cmds after changing to a new env (shell) in a shell script

Hi, I am using HP-UNIX. I have a requirement as below I have to change env twice like: cadenv <env> cadenv <env> ccm start -d /dbpath ccm tar -xvf *.tar ccm rcv .... mv *.tar BACKUP but after I do the first cadenv <env> , I am unable to execute any of the later commands . ... (6 Replies)
Discussion started by: charlei
6 Replies

5. Shell Programming and Scripting

Run a shell script from one host which connext to remote host and run the commands

I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies

6. Shell Programming and Scripting

[How To?] Run shell script and get output into another shell.

Hi guys, I have a simple question, I want to store the output of the following command: As you can see it is running all the time, and we get a new line every 3sec. I just want to store these new lines into a single variable, so I can use it into a script. To clear the screen, and... (4 Replies)
Discussion started by: Thireus
4 Replies

7. Shell Programming and Scripting

Run SQL thru shell script: how to get a new line when run sql query?

Hi, this's Pom. I'm quite a new one for shell script but I have to do sql on shell script to query some information from database. I found a concern to get a new line...When I run my script, it retrieves all data as wondering but it's shown in one line :( What should I do? I'm not sure that... (2 Replies)
Discussion started by: Kapom
2 Replies

8. Shell Programming and Scripting

To run a local shell script in a remote machine by passing arguments to the local shell script

I need to run a local shell script on a remote machine. I am able to achieve that by executing the command > ssh -qtt user@host < test.sh However, when I try to pass arguments to test.sh it fails. Any pointers would be appreciated. (7 Replies)
Discussion started by: Sree10
7 Replies

9. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
PO4A-RUNTIME.7(7)                                       User Contributed Perl Documentation                                      PO4A-RUNTIME.7(7)

NAME
po4a-runtime - po4a and runtime gettext translation without Autotools Introduction With po4a-build, po4a also includes support for adding translation of runtime script output messages using gettext but without requiring the package to adopt Autotools and the typical ./configure process. Using example Makefile snippets, packages can harness intltool with minimal effort. Layout Documentation translation should NOT use the same po/ directory as the runtime translation. Whilst runtime translation can use directories other than po/, it is usually easiest to go with the convention. Multiple languages Just a word on packages that use scripts in multiple programming languages. A common mix is Perl and shell. Note bene: gettext WILL get confused and omit strings from one or other language unless file extensions are used for whichever is the least problematic language. When using multiple languages, experiment with various settings in po/Makevars until you get all the strings you need in the POT file. In particular, specifying two languages in po/Makevars can be problematic. Instead of: # Don't do this: XGETTEXT_OPTIONS = -L Perl -L Shell --from-code=iso-8859-1 Consider renaming (or providing symlink(s) for) all files for one of the languages involved and omitting the explicit -L options. The file extension only needs to exist during the time that po/POTFILES.in is being processed. The --keywords option can also be useful - see the xgettext documentation. Populating po/ So, create your top level po/ directory and then use the example files in /usr/share/doc/po4a/examples/ to populate it. LINGUAS Must exist, even if empty. Consists of a list of translations - each line not starting with a '#' must match an existing PO file. e.g. if LINGUAS contains a single line, 'fr', an fr.po file must exist alongside the LINGUAS file. $ cat po/LINGUAS cs de fr $ By convention, the LINGUAS file is sorted alphabetically but that is a manual process. POTFILES.in The list of files containing the messages that need to be translated at runtime - i.e. your scripts. If you've used the top level po/ directory, the paths should be relative to the top level directory, not the po/ directory itself. $ ls -l myscript.pl another.pl foo/support.pl po/ po/POTFILES.in $ cat po/POTFILES.in myscript.pl another.pl foo/support.pl $ Note that it is explicitly supported that the scripts themselves can contain strings for both runtime and documentation translation, e.g. using gettext functions for runtime and embedded POD content for documentation. So it is not a problem to have the same file listed in po/POTFILES.in and doc/po4a-build.conf Makevars-perl.example If your scripts are in Perl, copy this example file as po/Makevars and edit it to suit. Makevars-shell.example If your scripts are in shell, copy this example file as po/Makevars and edit it to suit. po4a-build.make Copy this example file as po/Makefile - it shouldn't need editing but you may want to keep it updated against /usr/share/doc/po4a/examples/po4a-build.make as it may need to be updated within po4a releases as the underlying intltool support changes. (The file itself was generated from another project using Autotools and intltool.) Building These snippets need to be added to your top level Makefile or whatever other method you use to prepare your sources for distribution. clean: $(MAKE) -C po/ clean install: $(MAKE) -C po/ install DESTDIR=$(DESTDIR) dist: $(MAKE) -C po/ pot (In an Autotools project, this would happen automatically by simply adding po to the "SUBDIRS" value in Makefile.am.) Maintenance Runtime translation isn't quite as easy as po4a-build in that adding a new translation does require editing po/LINGUAS, but apart from that, updating translations is merely a case of replacing the relevant PO file with the new version. Depending on how you prepare your source tarball, you may also need to list new PO files in the MANIFEST file or add to the script(s) that prepare the tarball. (That also applies to po4a-build.) Any *.mo or *.gmo files in po/ can be deleted / cleaned up. Copyright Whilst the example files are part of the po4a project, you are free to use, modify and distribute them in your own projects without needing to refer back to po4a or list the po4a team in your own copyright notices, in the same manner as other build tools like Automake itself. If you want to mention po4a, that is fine too. AUTHORS
Neil Williams <linux@codehelp.co.uk> perl v5.14.2 2012-05-17 PO4A-RUNTIME.7(7)
All times are GMT -4. The time now is 09:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy