Hi,
I have a set of files and i need to substitute an existing pattern with a new one.I have used sed to do the simple substitution.
sed -e 's/Old/New/g' file_name > new_file
But it is case sensitive. I have a set of files which are having a different case for the pattern.
Can anyone let me...
Hi,
I have a set of files and i need to substitute an existing pattern with a new one.
I have used sed to do the simple substitution.
sed -e 's/Old/New/g' file_name > new_file
But it is case sensitive. I have a set of files which are having a different case for the pattern.
Can anyone let...
I have a input file which looks like
john /ghsgd/kjhfdf/kjdfkjd
john /ruey/oieroiern/oieroeiroi
jim /kjskksj/kdjfkdjf/kdjfkjd
john /jdkfjd/kjdfdfjh/fjgfjg/kdfikdhf
jim /gdhfgdf/lgkfjg/orit
mike /kdjfjdk/jhjdfhjdf/jdhfjdhf/jhdjfhdjf
..............
................
many other names and many...
Hi,
I have a file with many input lines and i want to exclude
the lines which look like from my output file "output_file"..
-----------------|------------------[ added ]----------
my code which i thought could solve looks like this
open(INP, "input_file");
open(ONP ...
Hi,
I have an input file with about 330 lines in it.
The input file is created as a result of this script.
script1
========
#!/usr/local/bin/perl
open(IPF, "/home/dc5/uniq.txt");
open(OPF, ">> /home/dc5/uniqout.txt");
while(<IPF>) { $buffer .= $_}
close IPF;
$buffer =~...
Hi,
I have a text file with each line having variable number of words..
how do i print the first few words and last word of a line in to an output file.
I was doing with $NF for the last feild in shell scripts how do i do it in perl.
sample text file
====================
hgahgdhsgd...
Hi ,
I have an input file with entries in each lines
aaaaa bbbbb
cccccc dddddddd
eeee fffff gggg
hhhh iiii jjjj
..... .... ....
..... .... ....
i would like to have an output file with contents
aaaaa bbbbb cccccc dddddddd
eeee fffff gggg hhhh iiii jjjj
i.e., 1st and 2nd line to be in...
i have a file with contents like
<<< file1: abcd.c
>>> file2: abcd.cx
--------[after 12]-----|-----------[inserted 67-80]------
---------[deleted 67-89]---|---------[after 56]----------
<<< file1: def.c
how do i select only lines that come in between >>> and
<<<
ie.,
--------[after...
i have a file with contents like
<<< file1: abcd.c
>>> file2: abcd.cx
--------[after 12]-----|-----------[inserted 67-80]------
---------[deleted 67-89]---|---------[after 56]----------
<<< file1: def.c
how do i select only lines that come in between >>> and
<<<
ie.,
--------[after...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.