Sponsored Content
Top Forums Shell Programming and Scripting Call a Perl script within a bash script and store the ouput in a .txt file Post 302876300 by mecaka on Friday 22nd of November 2013 05:07:44 PM
Old 11-22-2013
Quote:
Originally Posted by Corona688
Sometimes, 'file not found' can mean it can't find a library. Check that perl runs properly when you run it by hand.

But I suspect it really means what it says -- the file really, genuinely isn't there. Look very closely for typos.
Wow... Yeah, the actual filename was "getIDs.plx", my code said "getIds.plx", and the code I posted didn't have the 'g'... Thanks for pointing that out! Smilie
This User Gave Thanks to mecaka For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Modify Perl script to work with txt - Permissions script

Hi I have this code, and i want work with a ls -shalR output in .txt What i need read to do this?? Where start? #!/usr/bin/perl # Allrights- A perl tool for making backups of file permissions # Copyright (C) 2005 Norbert Klein <norbert@acodedb.com> # This program is free... (1 Reply)
Discussion started by: joangopan
1 Replies

2. Shell Programming and Scripting

call shell script from perl cgi script problem

hi,, i have perl scipt with line : system('./try.sh $t $d $m'); in shell scipt try.sh i have the line: echo $1 its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
Discussion started by: raksha.s
2 Replies

3. Shell Programming and Scripting

Perl cgi script to call bash script?

Novice to perl here. I have created a simple web page in perl, with only one submit button. I would like to execute a bash script on the same server when this button is clicked on. Is this possible in perl? I have spent a few days researching this and am unable to find any useful information.... (0 Replies)
Discussion started by: pleonard
0 Replies

4. Shell Programming and Scripting

how to call a bash script using perl

Hi I m new to perl. I m trying to write a perl script that calls a bash script; does anyone have a script already that they can provide or help me out? Thanks a lot. (2 Replies)
Discussion started by: adnan786
2 Replies

5. Shell Programming and Scripting

bash script to sort a txt file

I am writing a script to write to and a sort txt file. After I sort the file I want to add 2 to each line of the file. My script thus far is #!/bin/bash cat > /ramdisk/home/stux/unsortedints.out COUNT=0 FILE =/ramdisk/home/stux/unsortedints.out for i in {1..100} do NUMBER = $ echo $NUMBER... (3 Replies)
Discussion started by: puttyirc
3 Replies

6. Shell Programming and Scripting

shell script to call perl script problems

Ok, don't ask me why, but all calls to perl must be called by a shell script. Its really not ideal, but its what I have to work with. Calling it isnt the issue, its passing in the arguments. I have about 1000 perl scripts to call by a shell script. Right now, I'm executing the shell script... (3 Replies)
Discussion started by: regexnub
3 Replies

7. Shell Programming and Scripting

How to call a bash command from within a perl script?

In a bash script, one can call a perl command in the following manner, where "myperlcommand" is a perl command. perl -e 'myperlcommand(arguments)' perl -e 'print("UUUU"x4)' Now, how can one call a bash command from within a perl script? (Suppose that mybashcommand is a bash... (1 Reply)
Discussion started by: LessNux
1 Replies

8. UNIX for Dummies Questions & Answers

Write pid and command name to a txt file while executing a bash script

Hi All, Just have a requirement, I am executing a bash shell script, my requirement is to catch the pid and job name to a txt file in the same directory, is there anyway to do it? please help me out. Regards Rahul ---------- Post updated at 08:42 AM ---------- Previous update was at... (2 Replies)
Discussion started by: rahulkalra9
2 Replies

9. Shell Programming and Scripting

Need Help: Shell script to call sql session with variables stored in .txt file

Hi, I need help in writing a shell script which can read data from a text file (Cancel_ID.txt) and then calls sqlplus session (Cancel.sql) with the first line parameter of the text file ("0322600453") till all rows are not completed. ... (4 Replies)
Discussion started by: Khan28
4 Replies

10. Programming

Writing a UNIX shell script to call a C function and redirecting data to a .txt file

Hi, I am complete new to C programming and shell scripting. I just wrote a simple C code to calculate integral using trapezoid rule. I am prompting user to pass me No. of equally spaced points , N , upper and lower limit. My code looks as follows so far: #include<stdio.h> #include<string.h>... (2 Replies)
Discussion started by: bjhjh
2 Replies
Test::Spelling(3)					User Contributed Perl Documentation					 Test::Spelling(3)

NAME
Test::Spelling - check for spelling errors in POD files SYNOPSIS
use Test::More; BEGIN { plan skip_all => "Spelling tests only for authors" unless -d 'inc/.author'; } use Test::Spelling; all_pod_files_spelling_ok(); DESCRIPTION
"Test::Spelling" lets you check the spelling of a POD file, and report its results in standard "Test::More" fashion. This module requires a spellcheck program such as spell, aspell, ispell, or hunspell. use Test::Spelling; pod_file_spelling_ok('lib/Foo/Bar.pm', 'POD file spelling OK'); Note that it is a bad idea to run spelling tests during an ordinary CPAN distribution install, or in a package that will run in an uncontrolled environment. There is no way of predicting whether the word list or spellcheck program used will give the same results. You can include the test in your distribution, but be sure to run it only for authors of the module by guarding it in a "skip_all unless -d 'inc/.author'" clause, or by putting the test in your distribution's xt/ directory. Anyway, people installing your module really do not need to run such tests, as it is unlikely that the documentation will acquire typos while in transit. :-) You can add your own stop words, which are words that should be ignored by the spell check, like so: add_stopwords(qw(asdf thiswordiscorrect)); Adding stop words in this fashion affects all files checked for the remainder of the test script. See Pod::Spell (which this module is built upon) for a variety of ways to add per-file stop words to each .pm file. If you have a lot of stop words, it's useful to put them in your test file's "DATA" section like so: use Test::Spelling; add_stopwords(<DATA>); all_pod_files_spelling_ok(); __END__ folksonomy Jifty Zakirov To maintain backwards compatibility, comment markers and some whitespace are ignored. In the near future, the preprocessing we do on the arguments to add_stopwords will be changed and documented properly. FUNCTIONS
all_pod_files_spelling_ok( [@files/@directories] ) Checks all the files for POD spelling. It gathers all_pod_files() on each file/directory, and declares a "plan" in Test::More for you (one test for each file), so you must not call "plan" yourself. If @files is empty, the function finds all POD files in the blib directory if it exists, or the lib directory if it does not. A POD file is one that ends with .pod, .pl, .plx, or .pm; or any file where the first line looks like a perl shebang line. If there is no working spellchecker (determined by "has_working_spellchecker"), this test will issue a "skip all" directive. If you're testing a distribution, just create a t/pod-spell.t with the code in the "SYNOPSIS". Returns true if every POD file has correct spelling, or false if any of them fail. This function will show any spelling errors as diagnostics. pod_file_spelling_ok( $filename[, $testname ] ) "pod_file_spelling_ok" will test that the given POD file has no spelling errors. When it fails, "pod_file_spelling_ok" will show any spelling errors as diagnostics. The optional second argument is the name of the test. If it is omitted, "pod_file_spelling_ok" chooses a default test name "POD spelling for $filename". all_pod_files( [@dirs] ) Returns a list of all the Perl files in each directory and its subdirectories, recursively. If no directories are passed, it defaults to blib if blib exists, or else lib if not. Skips any files in CVS or .svn directories. A Perl file is: o Any file that ends in .PL, .pl, .plx, .pm, .pod or .t. o Any file that has a first line with a shebang and "perl" on it. Furthermore, files for which the filter set by "set_pod_file_filter" return false are skipped. By default, this filter passes everything through. The order of the files returned is machine-dependent. If you want them sorted, you'll have to sort them yourself. add_stopwords(@words) Add words that should be skipped by the spellcheck. Note that Pod::Spell already skips words believed to be code, such as everything in verbatim (indented) blocks and code marked up with ""..."", as well as some common Perl jargon. has_working_spellchecker "has_working_spellchecker" will return "undef" if there is no working spellchecker, or a true value (the spellchecker command itself) if there is. The module performs a dry-run to determine whether any of the spellcheckers it can will use work on the current system. You can use this to skip tests if there is no spellchecker. Note that "all_pod_files_spelling_ok" will do this for you. set_spell_cmd($command) If you want to force this module to use a particular spellchecker, then you can specify which one with "set_spell_cmd". This is useful to ensure a more consistent lexicon between developers, or if you have an unusual environment. Any command that takes text from standard input and prints a list of misspelled words, one per line, to standard output will do. set_pod_file_filter($code) If your project has POD documents written in languages other than English, then obviously you don't want to be running a spellchecker on every Perl file. "set_pod_file_filter" lets you filter out files returned from "all_pod_files" (and hence, the documents tested by "all_pod_files_spelling_ok"). set_pod_file_filter(sub { my $filename = shift; return 0 if $filename =~ /_ja.pod$/; # skip Japanese translations return 1; }); set_pod_parser($object) By default Pod::Spell is used to generate text suitable for spellchecking from the input POD. If you want to use a different parser, perhaps a customized subclass of Pod::Spell, call "set_pod_parser" with an object that is-a Pod::Parser. Be sure to create a fresh parser object for each file (don't use this with "all_pod_files_spelling_ok"). SEE ALSO
Pod::Spell ORIGINAL AUTHOR
Ivan Tubert-Brohman "<itub@cpan.org>" Heavily based on Test::Pod by Andy Lester and brian d foy. MAINTAINER
Shawn M Moore "<code@sartak.org>" COPYRIGHT
Copyright 2005, Ivan Tubert-Brohman, All Rights Reserved. You may use, modify, and distribute this package under the same terms as Perl itself. perl v5.16.3 2014-06-10 Test::Spelling(3)
All times are GMT -4. The time now is 10:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy