Sponsored Content
Full Discussion: Batch file and perl
Special Forums Windows & DOS: Issues & Discussions Batch file and perl Post 302927361 by cmccabe on Tuesday 2nd of December 2014 12:58:26 PM
Old 12-02-2014
You are correct
Code:
 @set or @echo off

can be used. Thank you very much for all of your help Smilie.
 

9 More Discussions You Might Find Interesting

1. IP Networking

batch file

my requirment is i have to call a batch file from a c++ program that batch file is called with the argument as print.txt print.txt is a text file which should get printed on printer (any printer) when a batch file call is made 1) how to call a batch file in c++ 2) how to print the text... (1 Reply)
Discussion started by: ramneek
1 Replies

2. Programming

batch file

what is a command to call a batch file from a c++ program when called with the argument which is a text file, then how to print that text file on a printer. please help me with code if possible (3 Replies)
Discussion started by: ramneek
3 Replies

3. UNIX for Advanced & Expert Users

Batch file question

EDIT: Is this wrong thread? Hi I am on an Apple Mac and I am trying to run this batch file on my Mac and was wondering if anyone could tell me what a script that will make this run and work on my Mac. I was hoping that you could tell me the script in the shell format? So here's the batch... (4 Replies)
Discussion started by: Billy5555100
4 Replies

4. Shell Programming and Scripting

Batch file to remove double quotes from a file

Hi I have to create a windows batch file which will read an input file and remove "double quotes" from each line of the file. For eg.If input file name is abcd.csv and contents is : "asasd,123123,213213,asd" "esfrf,dsfsdf,234324,sdfsdf" Then the batch file should remove "" from the... (11 Replies)
Discussion started by: akashtcs
11 Replies

5. UNIX for Advanced & Expert Users

batch file

Hi all I am using tru64 Unix and I want a ready batch file which makes me to change all user passwords at the same time ,instead of changing everyone separately. Please could anyone help me to do that. bye. (1 Reply)
Discussion started by: ahmedbashir
1 Replies

6. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

7. Shell Programming and Scripting

Perl: batch replace a portion of text in files

Hi all, What I would like to achieve is to batch change the code below in every pdf in a given directory (each pdf is uncompressed so that can be easily edited). An example of the javascript code: if (this.hostContainer) { try { this.hostContainer.postMessage(pp_216', 15259]);... (3 Replies)
Discussion started by: menteith
3 Replies

8. Shell Programming and Scripting

Renaming file in batch

Hi guys, I need a script to change the file names e.g.:- below are the mentioned files, i want t0 change the last character of the name 00000.cdr with e.g bep01.smsc.191214210500-00000.cdr to bep01.smsc.191214210500-92311.cdr next file be like bep01.smsc.191214210500-92312.cdr # ls -ltr... (9 Replies)
Discussion started by: mfaizan40
9 Replies

9. Shell Programming and Scripting

Perl error in batch command but works one at a time

In the below perl executes if one file is processed perfect. However, when multiple files are processed in batch which is preferred I get the below error that I can not seem to fix it as the '' necessary for the command to execute, but seem to only work for one -arg option. Thank you :). ... (2 Replies)
Discussion started by: cmccabe
2 Replies
MARC::Batch(3pm)					User Contributed Perl Documentation					  MARC::Batch(3pm)

NAME
MARC::Batch - Perl module for handling files of MARC::Record objects SYNOPSIS
MARC::Batch hides all the file handling of files of "MARC::Record"s. "MARC::Record" still does the file I/O, but "MARC::Batch" handles the multiple-file aspects. use MARC::Batch; # If you have werid control fields... use MARC::Field; MARC::Field->allow_controlfield_tags('FMT', 'LDX'); my $batch = MARC::Batch->new( 'USMARC', @files ); while ( my $marc = $batch->next ) { print $marc->subfield(245,"a"), " "; } EXPORT
None. Everything is a class method. METHODS
new( $type, @files ) Create a "MARC::Batch" object that will process @files. $type must be either "USMARC" or "MicroLIF". If you want to specify "MARC::File::USMARC" or "MARC::File::MicroLIF", that's OK, too. "new()" returns a new MARC::Batch object. @files can be a list of filenames: my $batch = MARC::Batch->new( 'USMARC', 'file1.marc', 'file2.marc' ); Your @files may also contain filehandles. So if you've got a large file that's gzipped you can open a pipe to gzip and pass it in: my $fh = IO::File->new( 'gunzip -c marc.dat.gz |' ); my $batch = MARC::Batch->new( 'USMARC', $fh ); And you can mix and match if you really want to: my $batch = MARC::Batch->new( 'USMARC', $fh, 'file1.marc' ); next() Read the next record from that batch, and return it as a MARC::Record object. If the current file is at EOF, close it and open the next one. "next()" will return "undef" when there is no more data to be read from any batch files. By default, "next()" also will return "undef" if an error is encountered while reading from the batch. If not checked for this can cause your iteration to terminate prematurely. To alter this behavior, see "strict_off()". You can retrieve warning messages using the "warnings()" method. Optionally you can pass in a filter function as a subroutine reference if you are only interested in particular fields from the record. This can boost performance. strict_off() If you would like "MARC::Batch" to continue after it has encountered what it believes to be bad MARC data then use this method to turn strict OFF. A call to "strict_off()" always returns true(1). "strict_off()" can be handy when you don't care about the quality of your MARC data, and just want to plow through it. For safety, "MARC::Batch" strict is ON by default. strict_on() The opposite of "strict_off()", and the default state. You shouldn't have to use this method unless you've previously used "strict_off()", and want it back on again. When strict is ON calls to next() will return undef when an error is encountered while reading MARC data. strict_on() always returns true(1). warnings() Returns a list of warnings that have accumulated while processing a particular batch file. As a side effect the warning buffer will be cleared. my @warnings = $batch->warnings(); This method is also used internally to set warnings, so you probably don't want to be passing in anything as this will set warnings on your batch object. "warnings()" will return the empty list when there are no warnings. warnings_off() Turns off the default behavior of printing warnings to STDERR. However, even with warnings off the messages can still be retrieved using the warnings() method if you wish to check for them. "warnings_off()" always returns true(1). warnings_on() Turns on warnings so that diagnostic information is printed to STDERR. This is on by default so you shouldn't have to use it unless you've previously turned off warnings using warnings_off(). warnings_on() always returns true(1). filename() Returns the currently open filename or "undef" if there is not currently a file open on this batch object. RELATED MODULES
MARC::Record, MARC::Lint TODO
None yet. Send me your ideas and needs. LICENSE
This code may be distributed under the same terms as Perl itself. Please note that these modules are not products of or supported by the employers of the various contributors to the code. AUTHOR
Andy Lester, "<andy@petdance.com>" perl v5.10.1 2010-03-29 MARC::Batch(3pm)
All times are GMT -4. The time now is 10:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy