Sponsored Content
Full Discussion: Looping through input/output
Top Forums UNIX for Beginners Questions & Answers Looping through input/output Post 302979961 by wisecracker on Monday 22nd of August 2016 11:38:12 AM
Old 08-22-2016
Quote:
Originally Posted by zajtat
I was going through the post again to look over things and have double-checked that the perl script works fine with files that have numbers as names. There are no bugs in perl script and there has never been such a problem, that's why I've answered a question about the name of the output file that it does not matter. I did try to provide clear information and answer all the questions to the best of my abilities and I apologise that it was not understandable. Thank you all of your time and help once more!
Apologies for any typos.

But was it tested with a file named 0, zero? Looking at your alternative code there is NO 0, zero, file generated at all; your files start with the number 1.

We are not trying to belittle you, just glean as much information as possible to satisfy your requirements. You have no idea how difficult some problems are for volunteers on here, and remember we ARE volunteers, to solve with limited or incorrect information. Until late into this thread no-one even knew about a Perl script and the error report pointed straight to an unknown script at that time. If we had the Perl script to view the Perl experts on here would have probably solved your problem without ANY errors from either the Perl or the Shell scripts well inside in less than 20 odd replies.

There can't be anything so secret about your Perl script that you cannot show it to us.

Your Perl script might need a specific _library_/module and that module may be causing this error, who knows, we don't, as we do not have this script to view.

Please oh please, for everyones' sanity, give as much information as possible so that the big guns on here, who give their time for free, can supply you with a solution ASAP.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using Output from one command as input to another

This site has been very helpful thus far.. I thank you all in advance for sharing the knowledge. Let me get to it. I am trying to write a very small script to take away from the boredom of doing the same thing over and over. Everynow and again I have to get the hex value of a file using a... (2 Replies)
Discussion started by: BkontheShell718
2 Replies

2. UNIX for Advanced & Expert Users

input/Output settings

How can we view all the input/output settings of unix environment for a session (6 Replies)
Discussion started by: paritoshc
6 Replies

3. Shell Programming and Scripting

input -output file

Hi, I am having an Input file .which is having a list of names. comapring with our database , needs to write the out put in file called output.txt , format should be name--> country--->phone number could you please help me.. thanks in advance (7 Replies)
Discussion started by: hegdeshashi
7 Replies

4. Shell Programming and Scripting

perl: looping through the output of a 'system' command

Hi there could anybody point me in the right direction when it comes to looping through the output of a system command in perl (i.e. df -k) doing a test against each line to see if it matches? for example if i have a df -k output like this and I wanted to grab the lines that matched "sda" or... (3 Replies)
Discussion started by: rethink
3 Replies

5. Shell Programming and Scripting

Dynamic output file generation using a input text file with predefined output format

Hi, I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format. Example: File.txt AP|{SSHA}VEEg42CNCghUnGhCVg== APVG3|{SSHA}XK|"password" AP3|{SSHA}XK|"This is test" .... etc --------- test.sh has... (1 Reply)
Discussion started by: hudson03051nh
1 Replies

6. Solaris

SVM Solaris 8 Problem. Metastat output looping

Hi friends, I'm newbie to SVM. Just wanna try installed it on one of our server (to do mirroring for disk0 and disk1) but i think im lost until now. :( the steps i've taken is as below:- 1.prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2 2.metadb -a -c 3 -f c1t0d0s7... (3 Replies)
Discussion started by: kronenose
3 Replies

7. Shell Programming and Scripting

Looping through for user input

Legends, I want to remain in the script until user passes the correct name. I had tried the below code; but it didn't work out. Please help echo "\nPlease enter the source system: \c" while read SYSTEM_NAME do if ]; then echo "\nMaking $SYSTEM_NAME as source system for particular... (5 Replies)
Discussion started by: sdosanjh
5 Replies

8. Shell Programming and Scripting

looping and saving output of each line separately

I have been trying this program for a long time. I am trying to read a file named "odon" line by line; read the first line, send it to do a command saved in a file "perm", once the first line has finished going through the content of the file perm, the result is saved with the number of the line.... (17 Replies)
Discussion started by: iconig
17 Replies

9. UNIX for Dummies Questions & Answers

Looping through the contents of array for output name

Hi all, I am trying to loop through the string contents of an array, to add it during the saving of the output files. I am trying this code to print each column and save it to unique file name, but it doesn't work. Thanks for any help. fnam=(japan usa uk) alldata.dat contained sample data... (1 Reply)
Discussion started by: ida1215
1 Replies

10. Shell Programming and Scripting

Looping over output of 'ls'

Hi, I have some output from 'ls' command and I want to loop over the output in a bash script. What would be a good way to go about it? For example, if the output of the ls command gives me 'prefix1 prefix2 prefix3', how can I set a loop that will iterate over these? many thanks! (5 Replies)
Discussion started by: pc2001
5 Replies
Test::Script(3pm)					User Contributed Perl Documentation					 Test::Script(3pm)

NAME
Test::Script - Basic cross-platform tests for scripts DESCRIPTION
The intent of this module is to provide a series of basic tests for 80% of the testing you will need to do for scripts in the script (or bin as is also commonly used) paths of your Perl distribution. Further, it aims to provide this functionality with perfect platform-compatibility, and in a way that is as unobtrusive as possible. That is, if the program works on a platform, then Test::Script should always work on that platform as well. Anything less than 100% is considered unacceptable. In doing so, it is hoped that Test::Script can become a module that you can safely make a dependency of all your modules, without risking that your module won't on some platform because of the dependency. Where a clash exists between wanting more functionality and maintaining platform safety, this module will err on the side of platform safety. FUNCTIONS
script_compiles script_compiles( 'script/foo.pl', 'Main script compiles' ); The "script_compiles" test calls the script with "perl -c script.pl", and checks that it returns without error. The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the local name used will be shown in the diagnostic output. Note also that the test will be run with the same perl interpreter that is running the test script (and not with the default system perl). This will also be shown in the diagnostic output on failure. script_runs script_runs( 'script/foo.pl', 'Main script runs' ); The "script_runs" test executes the script with "perl script.pl" and checks that it returns success. The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the local name used will be shown in the diagnostic output. The test will be run with the same perl interpreter that is running the test script (and not with the default system perl). This will also be shown in the diagnostic output on failure. SUPPORT
All bugs should be filed via the bug tracker at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Script> For other issues, or commercial enhancement and support, contact the author. AUTHOR
Adam Kennedy <adamk@cpan.org> SEE ALSO
prove, <http://ali.as/> COPYRIGHT
Copyright 2006 - 2009 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.1 2009-11-24 Test::Script(3pm)
All times are GMT -4. The time now is 07:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy