I have a pipe delimited input file as below. First byte of the each line indicate the record type. Then i need to split the file based on record_type = null,0,1,2,6 and create 5 files. How do i do this in a ksh script? Pls help
|sl||SL|SL|SL|1996/04/03|1988/09/15|C|A|sl||||*|... (4 Replies)
Hi
I am trying to retrieve values from a tab-delimited file.I am using
while read record
value=`echo $record | cut -f12`
done
Where 12 is the column no i want retieve and record is one line of the file.
But it is returning the full record.
Plz help (4 Replies)
Hi, I am looking for a unix command which inserts double quotes around all values in a delimited file. For example,
Input File
153665031,abc,abc ,abc
131278839,def,def ,dec
179821481,efg,efg ,lmn ... (6 Replies)
I would like to use a variable to store the IDs that I would like to extract.
I would like to extract a list of values of the IDs from a delimited string. Using bash here.
file format would be
id1=we1;id2=er2;id3=rt3;id4=yu4
The number of fields and records is not fixed. There could be... (2 Replies)
this is Korn shell unix.
The scenario is I have a pipe delimited text file which needs to be customized. say for example,I have a pipe delimited text file with 15 columns(| delimited) and 200 rows. currently the 11th and 12th column has null values for all the records(there are other null columns... (4 Replies)
Hi
I have a large text file and I want to split its content into multiple flies.
this large file contains several blocks of codes separated by a comment line for each block.
this comment line represents a directory path
So, when separate these blocks each into a separate file, This output... (7 Replies)
This could be a really dummy question.
I have a log text file.
What unix command to extract line from specific string to another specific string.
Is it something similar to?:
more +/"string" file_name
Thanks (4 Replies)
Hi,
Anyone can help, I have a large textfile (one file), and I need to split into multiple file to break each file into ^L.
My textfile
==========
abc company
abc address
abc contact
^L
my company
my address
my contact
my skills
^L
your company
your address
========== (3 Replies)
HI
I want to split file base on tag name.
I have few header and footer on file
<?xml version="1.33" encing="UTF-8"?>
<bulkCmConfigDataFile"
<xn:SubNetwork id="ONRM_ROOT">
<xn:MeContext id="PPP04156">
... (4 Replies)
Hello,
I need to split a pipe de-limited file based on the COLUMN 7 value . If the column value changes I need to split the file
Source File
Payment|ID|DATE|TIME|CONTROLNUMBER|NUMBER|NAME|INDICATOR
42156974|1137937|10/1/2018|104440|4232|2054391|CARE|1... (9 Replies)
Discussion started by: rosebud123
9 Replies
LEARN ABOUT DEBIAN
filtergen
FILTERGEN(8) System Manager's Manual FILTERGEN(8)NAME
filtergen - packet filter compiler
SYNOPSIS
filtergen [ -h | --help ] [ -V | --version ] [ -c | --compile ] [ -t target | --target=target ] [ -o outfile | --output=outfile ] infile
filtergen [ -h | --help ] [ -V | --version ] [ -c | --compile ] [ -t target | --target=target ] [ -o outfile | --output=outfile ] [ -F pol-
icy | --flush=policy ]
DESCRIPTION
filtergen compiles a high-level filtering description language into a variety of target formats.
USAGE
filtergen reads the ruleset from the infile specified on the command line (or standard input if infile is "-") and outputs to standard out-
put (or outfile) via an optionally specified backend.
Both short and GNU-style long option options are accepted:
-c, --compile
Only try to "compile" the input, and do not generate any output. This may be useful to check that an input file has no syntax
errors in it before one attempts to use the result on a live server.
-t target-filter, --target=target-filter
If specified, target-filter will be used to select an output filter type, otherwise the default of iptables will be used. Supported
backends are iptables, ipchains, ipfilter and cisco (for Cisco IOS access-lists).
-F policy, --flush=policy
Flush mode. Generate a set of rules for clearing all rules from the packet filter. Useful for firewall scripts that need to `shut-
down' the firewall. You can supply a policy argument in place of the usual filename, to specify whether the flushed filter should
default to accept, reject, or drop. It defaults to accept, equivalent to having no filter loaded at all. It is not necessary to
specify an infile when using flush mode.
-o outfile, --output=outfile
Write output to outfile instead of standard output.
-h, --help
Show command help.
-V, --version
Show program version.
BUGS
Not all backends implement all features.
The packet filter is not optimised.
SEE ALSO fgadm(8), filter_syntax(5), filter_backends(7)AUTHOR
filtergen was originally written by Matthew Kirkwood. Jamie Wilkinson <jaq@spacepants.org> then rewrote a lot of the internals, added some
features, and took on maintenance of the project.
January 7, 2004 FILTERGEN(8)