Search Results

Search: Posts Made By: jinsh
5,121
Posted By jinsh
but I need show text1 ~ text100 in output file,...
but I need show text1 ~ text100 in output file, the increased number be added at the end of each text.
5,121
Posted By jinsh
number format in Perl
I try to read in a file and write out a new file with increased number at the end of each line. And I can set the initial value and increased constant from inputs.

input file:
text1
text2
text3...
5,478
Posted By jinsh
It works! Thanks so much.
It works! Thanks so much.
5,478
Posted By jinsh
It's no problem print these lines in screen, but...
It's no problem print these lines in screen, but I still can't put these lines in file. Like my code:
open(OF, $infile);
open(NF, ">$outfile");

while ($line = <OF>) {
if ( $line =~ m/\[/ )
...
5,478
Posted By jinsh
It doesn't work for me. I try to use perl script...
It doesn't work for me. I try to use perl script to handle each line in file. The code I used:
open(OF, $infile);
while ($line = <OF>)
{
my $w = "(.+?)";
$line =~ m/^$w\[$w:$w\]/;
...
5,478
Posted By jinsh
add lines in file with perl
How to search string like: a[7:0] and replace to
a[0]
a[1]
a[2]
:
:
a[7]
in a file with perl?

Thanks,
Grace
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 08:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy