system("cat FILENAME | perl -e 'while(<>) { print $_;}'");
system("cat FILENAME | perl -e 'while(<>) { $_ =~ s/XXX/YYY/g; print $_;}'");
First command works fine but second command gives the following error:
syntax error at -e line 1, near "{ =~"
syntax error at -e line 1, near ";}"... (2 Replies)
How to write perl substitute command in shell script without invoking a perl script file seperately.
for ex:
shell script to relace IT with CSC in a file using perl substitute command. (3 Replies)
Hi, I'm trying to get this script to work on an AIX 5.3 box, I couldn't get pgrep for AIX, I also realize that ps works differently on the IBM boxes. Could anybody just give me the specifics of a work around for my problem, I'll adjust the whole script:
#!/bin/bash
# applabs.com
#to do:
#... (3 Replies)
Hi,
I have a string like this user can specify different query sets that is why "or" is mentioned:
$string="](";
or
$string="]((";
or
$string="](((";
or
$string="]((((("; (1 Reply)
Hi,
I have string like this:
$str=' DNA OR ("rna AND binding AND protein")';
I just wanted to substitute AND with a blank. How can i do that?
I want the output like this:
$string= DNA OR ("rna binding protein") (3 Replies)
Hi gurus,
I need help with shell script. I have various INSERT queries which inserts data into database. I want to insert 3rd column data into newline for one particular table. I have very time long txt file everytime and it have various INSERT/UPDATE queries but i have to done with it only one... (8 Replies)
I'd like to do this using Perl command line (sorry no awk, sed, etc.)
replace the 3 middle lines in a file by one line:
aaa 123
bbb 234
ccc 34567
dd 4567
ee 567
to:
aaa 123
AAA
ee 567
I tried this but not working:
perl -pi -e "s/aaa\ 123\nbbb\ 234\nccc\ 34567/AAA/" file (2 Replies)
hi all,
how do i assign values passed in from command line to and sql statement in perl ?? e.g
i want to assign :name1 and :Name2 to be whatever is passed into the perl script command line
my $sqlStr = "select * from test_table where column1 = upper(nvl(:name1, name1 )) and column2... (1 Reply)
Hi All,
We need to run a Connect direct script on Unix server to send a file to Mainframe server and at mainframe end there need to run another job through Runtask with some parameters need to be passed from C:D (unix) to mainframe.
My question is I have to pass parameters like DSN and FNAME as... (2 Replies)
I have a string like.
ATATATATTATTATATTATATTATT
I want to substitute the characters to "C" by using these locations
3 7
10 18
15 20
desired Output:
ATCCCCCTTACCCCCCCCCCTTATT
any clue will be great help. :wall:
thanks in advance. (2 Replies)
Discussion started by: admax
2 Replies
LEARN ABOUT DEBIAN
flow-mask
flow-mask(1) General Commands Manual flow-mask(1)NAME
flow-mask -- Apply tags to flow files.
SYNOPSIS
flow-mask [-hk] [-b big|little] [-C comment] [-d debug_level] [-m mask_fname] [-M active_def ...]
DESCRIPTION
The flow-mask utility is used to modify the source and destination mask length's in flow records.
OPTIONS -b big|little
Byte order of output.
-C Comment
Add a comment.
-d debug_level
Enable debugging.
-h Display help.
-k Keep time from input.
-m mask_fname
Load masks from mask_name. Defaults to /etc/flow-tools/cfg/mask
-M mask_def
Use active_def as the active tag definition(s).
The configuration file is a collection of definitions. A definition lists a sequence of prefixes and the mask length to replace the match-
ing prefix with. Lines begining with # are treated as comments and ignored.
mask-definition command Description
----------------------------------------------------------------------
mask-definition Begin mask-definition section
mask-definition foo
prefix List the prefix to match on and the
replacement mask.
prefix 128.146/16 24
EXAMPLES
#
#file: masks
#
mask-definition foo
# All networks in 128.146/16 are /24's.
prefix 128.146/16 24
# except for 128.146.214/24, which are /32's.
prefix 128.146.214/24 32
flow-cat flows | flow-mask -mfoo -Fmasks | flow-print -f4
FILES
Configuration files:
Mask - /etc/flow-tools/cfg/mask.cfg.
BUGS
None known.
AUTHOR
Mark Fullmer maf@splintered.net
SEE ALSO flow-tools(1)flow-mask(1)