10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies
2. Shell Programming and Scripting
Hi All ,
I have some fille names in a file which are sorted according to date. for example
file1_123.log 23 Jul 0Kb
file2_123.log 22 Jul 2Kb
file3_123.log 20 Jul 0Kb
file1_456.log 24 Jul 2Kb
file2_678.log 22 Jul 0Kb
file2_678.log 21 Jul 2Kb
here 123 is a... (2 Replies)
Discussion started by: LoneRanger
2 Replies
3. Shell Programming and Scripting
Hello ,
I have comma delimited file with over 20 fileds that i need to do some validations on. I have to check if certain fields are null and then write the line containing the null field into a new file and then delete the line from the current file.
Can someone tell me how i could go... (2 Replies)
Discussion started by: goddevil
2 Replies
4. Shell Programming and Scripting
Hi,
file -> temp.txt
cat temp.txt
/home/pradeep/123/a_asp.html
/home/pradeep/123/a_asp1.html
/home/pradeep/435/a_asp2.html
/home/pradeep/arun/abc/a_dfr.html
/home/pradeep/arun/123/a_kir.html
/home/pradeep/123/arun/a_dir.html
....
....
..
i need to get a_*.html(bolded strings... (4 Replies)
Discussion started by: pradebban
4 Replies
5. Shell Programming and Scripting
I have a huge file that has roughly 30304 lines. I need to extract specific info from that file. For example,
Box 1 > *aaaaaaaajjjj*
> hbbvjvj
> jdnnfddllll
> *dgdfhfekwjh*
Box 2 > *aaaaaaa'aj'jjj*
> dse hkjuejef bfdw
> dyeee
> dsewq
> *dgdfhfekwjh*
>feweiuei
Box 3 > *aaaa"aaaaj"jjj*
>... (25 Replies)
Discussion started by: Ernst
25 Replies
6. UNIX for Dummies Questions & Answers
Hi Gurus,
I have a file like below.. I have to match each with predefined pattern. If matches then have to write the entire record to a separate file. If not make the value as NULL and write the entire record into another file.
| is the delimiter
ravi123|2344|M
R123Vi|2345|F... (8 Replies)
Discussion started by: pvksandeep
8 Replies
7. Shell Programming and Scripting
Hello friends,
I am writing a simple shell script which will copy one particular type of files to backup folder if files exists. If files doesn't exists, mv command should not be executed.
My file pattern is like wcm-spider-maestro.log.2009-07-15, wcm-spider-maestro.log.2009-07-16 etc..
I... (6 Replies)
Discussion started by: sreenu.shell
6 Replies
8. Programming
Hi,
I have large files with fixed length fields or fields seperated by delimeter. I would like to do validation on some or all fields to check for numeric or date or characters etc.. I would like to write this in C++. Please let me know if any one have any ideas on this.
Thanks for all... (2 Replies)
Discussion started by: rameshmelam
2 Replies
9. UNIX for Dummies Questions & Answers
I am curious if the following can be done in a file in unix. Let's say I have a flat file with the following data
AAA,12,2,,,,
BBB,3,1,,,,
CCC,,,,,
DDD,2,,,,,
SQQ,,,,,
ASJ,,3,5
I only want to capture the data with values into a new file. If the data contains the pattern ,,,,, as in... (2 Replies)
Discussion started by: mode09
2 Replies
10. Programming
Sir,
I want to check for the repation of a user address in a file i used || as my delimiter and want to check repetaip0n of the address that is mailid and then i have to use IMAP and all.
How can i do this...
I am in linux ...and my file is linux file.
... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies
Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen(3pUser Contributed Perl DocumentatPerl::Critic::Policy::InputOutput::ProhibitTwoArgOpen(3pm)
NAME
Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen - Write "open $fh, q{<}, $filename;" instead of "open $fh, "<$filename";".
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
The three-argument form of "open" (introduced in Perl 5.6) prevents subtle bugs that occur when the filename starts with funny characters
like '>' or '<'. The IO::File module provides a nice object-oriented interface to filehandles, which I think is more elegant anyway.
open( $fh, '>output.txt' ); # not ok
open( $fh, q{>}, 'output.txt' ); # ok
use IO::File;
my $fh = IO::File->new( 'output.txt', q{>} ); # even better!
It's also more explicitly clear to define the input mode of the file, as in the difference between these two:
open( $fh, 'foo.txt' ); # BAD: Reader must think what default mode is
open( $fh, '<', 'foo.txt' ); # GOOD: Reader can see open mode
This policy will not complain if the file explicitly states that it is compatible with a version of perl prior to 5.6 via an include
statement, e.g. by having "require 5.005" in it.
CONFIGURATION
This Policy is not configurable except for the standard options.
NOTES
There are two cases in which you are forced to use the two-argument form of open. When re-opening STDIN, STDOUT, or STDERR, and when doing
a safe pipe open, as described in perlipc.
SEE ALSO
IO::Handle
IO::File
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-06-07 Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen(3pm)