Sponsored Content
Top Forums Shell Programming and Scripting Validate file count in korn shell script Post 302780797 by Scrutinizer on Friday 15th of March 2013 06:08:18 AM
Old 03-15-2013
@RudiC: if you use plain ls and filter within awk for *.txt then your suggestion will not be susceptible to maximum line length.

Last edited by Scrutinizer; 03-15-2013 at 07:21 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Korn Shell Script - Read File & Search On Values

I am attempting to itterate through a file that has multiple lines and for each one read the entire line and use the value then to search in other files. The problem is that instead of an entire line I am getting each word in the file set as the value I am searching for. For example in File 1... (2 Replies)
Discussion started by: run_unx_novice
2 Replies

2. UNIX for Dummies Questions & Answers

korn shell script to keep history of same file

Hello, How do I write a korn shell that will rename file with the current date. What I want to do is, I have a file that is re-written every day. But instead, I want to keep a 14 day history of the file. So I want to write a script that will rename the current file with a date attached to the... (2 Replies)
Discussion started by: watson2000
2 Replies

3. Shell Programming and Scripting

shell script to get the arrival count of file

Hello All, I have come across a small problem. It would be great if any of you could help me in resolving the issue. one file named dummy.txt will be ftped to Unix machine twice daily. If i receive it second time in a day i need to do some processing with the file. How to find the... (2 Replies)
Discussion started by: RSC1985
2 Replies

4. Shell Programming and Scripting

Monitor file generation for an hour using Korn shell script

Hi, I am new to this unix scripting, I got a requirement like.. Files with *.XML extension will be generating in a /home/sample/ folder for every 15 mins. I need to monitor those files in that particular folder for every hour. If no file has been generated in that particular folder for an... (7 Replies)
Discussion started by: siri_886
7 Replies

5. Shell Programming and Scripting

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each certificate and send the mail to the user. The user takes action to add the new certificate to the storage file and user owns the responsibility to update the input text file with the new certificate... (5 Replies)
Discussion started by: casmo
5 Replies

6. Shell Programming and Scripting

Write output to a file using Korn shell script

All, Can anyone please help me with the below scenario in korn shell script. Can anyone please give me some hints to proceed on this. I have a Flat file of the below format. Input file format:... (1 Reply)
Discussion started by: sp999
1 Replies

7. Programming

create a spool file based on values passed from korn shell to sql script

this is my issue. 4 parameters are passed from korn shell to sql script. parameter_1= varchar2 datatype or no value entered my user. parameter_2= number datatype or no value entered my user. parameter_3= number datatype or no value entered my user. parameter_4= number datatype or no... (5 Replies)
Discussion started by: megha2525
5 Replies

8. Shell Programming and Scripting

Need a ready Shell script to validate a high volume data file

Hi, I am looking for a ready shell script that can help in loading and validating a high volume (around 4 GB) .Dat file . The data in the file has to be validated at each of its column, like the data constraint on each of the data type on each of its 60 columns and also a few other constraints... (2 Replies)
Discussion started by: Guruprasad
2 Replies

9. Shell Programming and Scripting

Help with korn shell script to get the latest file versions in a directory

I want to write a korn shell script to get the latest three versions for a file in the directory having lot of files with various versions (files with prefix as same but time stamp as suffix) and compress it and at the same time have to remove the remaining versions of the file (other than latest... (4 Replies)
Discussion started by: maheshbabu
4 Replies

10. Shell Programming and Scripting

Help Needed with File Checker Korn Shell Script

I am attempting to write a korn shell script that does the following, but I am getting errors. I'm new to korn shell scripting and am not sure what I am doing wrong. Please help with example scripts. Thanks. 1) check for day of the week 2) if day of the week is Monday then check for the... (4 Replies)
Discussion started by: ijmoore
4 Replies
lg02of(8)						      System Manager's Manual							 lg02of(8)

Name
       lg02of - LG02 Matrix Line Printer

Syntax
       /usr/lib/lpdfilters/lg02of [-c] [-nlogin] [-hhost] [-wwidth] [-lnum] [-iindent]	[accounting file]

Description
       The  filter is used to filter text data destined for the LG02 line printer.  The filter handles the device dependencies of the printers and
       performs accounting functions.  Accounting records are written to the file specified by the af field in at the time of completion for  each
       job.

       The  filter can handle plain ASCII files and files that have been preprocessed by nroff.  The filter translates nroff control sequences for
       underlining, superscripting and subscripting into the correct LG02 control sequences.

       The filter can be the specified filter in both the of and the if fields in the file.  For further information, see  When  both  fields  are
       specified  the  of  filter  is used only to print the banner page.  It is then stopped to allow the if filter access to the printer. The if
       filter maintains accounting information.

       If the of field is the only one specified the filter is used to print the banner page.  It is then stopped and restarted.  This allows  the
       of filter to be used to maintain accounting information.

       If the if field is the only one specified the banner page will be sent directly to the printer. If the printer has been left in an undeter-
       mined state the banner page may not print correctly.

       The best results will be obtained when the filter is specified in both the of and if fields.  For a more detailed discussion on filters see
       the ``Line Printer Spooler Manual'' in the ULTRIX Supplementary Documents, Volume 2: Programmer.

Options
       The arguments passed to the filter depend on its use.  The of filter is called with the following arguments:

       lg02of -wwidth -llength
	      The  width and length values come from the pw and pl fields in the database. The if (or restarted of) filter is passed the following
	      arguments:

	lg02of -c -nlogin -hhost -wwidth -lnum -iindent  accounting file
	      The -c flag is optional, and supplied only when control characters are to be printed, that is, when the -l  option  of  is  used	to
	      print  the file. The -w and -l arguments are the same as for the of filter, however, they may have different values if the -w and/or
	      -z options of were used to print the file.  If the value of the width is greater than 80 the job will be printed in  landscape  mode
	      with  a  slightly  smaller font. The length of the page is assumed to be 66 regardless of the length specified.  The -n and -h argu-
	      ments specify the login name and host name of the job owner.  These arguments are used to  record  accounting  information.  The	-i
	      option  specifies  the  amount of indentation to be used. The last argument is the name of the accounting file specified from the af
	      field in the database.

Diagnostics
       Are sent to wherever specifies with the lf field.

Files
See Also
       lpr(1), pr(1), printcap(5), lpd(8), MAKEDEV(8), pac(8)
       ``Line Printer Spooler Manual,'' ULTRIX Supplementary Documents, Volume 2: Programmer

																	 lg02of(8)
All times are GMT -4. The time now is 05:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy