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
pfconfig(8c)															      pfconfig(8c)

Name
       pfconfig - configure packet filter parameters

Syntax
       /usr/etc/pfconfig [ +/-p[romisc] ] [ +/-c[opyall] ] [ -b[acklog] nnn ] [ -a[ll] ] [interface-name ...]

Description
       The command allows the system manager to configure certain parameters of the packet filter driver (see These parameters are configured sep-
       arately for each interface; the interfaces are specified by name on the command line (for example, and If more than one interface is speci-
       fied,  they are all given the same settings.  Alternatively, you can specify -all to configure all the packet-filter interfaces on the sys-
       tem.

       You can set the following parameters with

       +promisc  Allows packet filter users to set the interface into promiscuous mode (receives all packets).	Whenever there	is  at	least  one
		 packet filter descriptor open with the ENPROMISC mode bit set, the interface is put into promiscuous mode.  When no such descrip-
		 tors are in use, the interface is returned to normal mode.

       -promisc  The interface is no longer put into promiscuous mode on behalf of packet filter users; if the interface is  in  promiscuous  mode
		 when  this  command  is given, it is returned to normal mode.	(The superuser may use to control promiscuous mode, overriding the
		 mode set by non-superusers.  This is the default setting.)

       +copyall  Allows packet filter users to set the interface into copy-all mode (receives packets sent/received by the kernel-resident  proto-
		 col  software	[for  example,	IP, ARP, DECnet, LAT] on this host).  Whenever there is at least one packet filter descriptor open
		 with the ENCOPYALL mode bit set, the interface is put into copy-all mode.  When no such descriptors are in use, the interface	is
		 returned to normal mode.

       -copyall  The  interface  is  no  longer put into copy-all mode on behalf of packet filter users; if the interface is in copy-all mode when
		 this command is given, it is returned to normal mode.	(The superuser may use to control copy-all mode, overriding the  mode  set
		 by non-superusers.  This is the default setting.)

       -backlog nnn
		 Sets  the  maximum  backlog  (packet  filter  input  queue length) for non-superuser descriptors to the specified number.  When a
		 descriptor is opened, it is given a queue length limit of two. An application can increase this backlog using the EIOCSETW  ioctl
		 request.   Superusers	are  allowed to increase their backlog up to a system-wide maximum; non-superusers are allowed to increase
		 their backlog only up to the maximum set by this program.  Note that allowing too large a backlog may result in vast  amounts	of
		 kernel memory being tied up in the packet filter driver queues.

       If no configuration parameters are specified, the command displays the current packet filter configuration for the network interface(s).

       Only the superuser may use this command to change the configuration.

Examples
       On a system used for network monitoring, one might put this line into
       /usr/etc/pfconfig -a +promisc -backlog 64
       This  allows  users to run promiscuous network monitoring applications, with a maximum input queue length per application of 64 packets, on
       any interface in the system.
       /usr/etc/pfconfig -a +promisc +copyall -backlog 64
       This allows promiscuous network monitoring applications to monitor communications to or from the local host, as well as	the  rest  of  the
       local network.

Diagnostics
       Messages  indicating  the specified interface do not exist; an attempt to set a maximum backlog less than 1 or greater than the system-wide
       maximum; the user tried to alter an interface's configuration but is not privileged.

See Also
       netstat(1), intro(4n), packetfilter(4), ifconfig(8c), rc(8)

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