Yes, Its working.
But my criteria is something different.
My input file data is,
1] First line should have 4 fields and need to check for last field value.
Solution is,
2] From 2nd line onward fields are 11 and all fields have values/not.
3] Need to check 6th fieldof each line. If 6th field value is VRAI, then values of 2nd and 4th fields from that line should be stored in an arraylist.
Please help me out to solve this 2 problems above.
Last edited by Franklin52; 09-28-2010 at 07:03 AM..
Reason: Please use code tags!
hi
i need to check for the value of one particular field : in the output file. the file may contain many such records as below
how to ????
*** Throttled with base name + key params!
:
: -518594328
: les.alarm.LBS12005
: les.alarm.LBS12005
: les
: lessrv1
: les
: 2328
: 0... (7 Replies)
My script is taking a file "input.in" as input for running the script. My worry is that i need to execute the script only if the file is present, if it's not don't perform the next commands.
Just to have a check at the beginning of the script : If "input.in" exists, then go on. If it's does not... (4 Replies)
Hi Everyone,
# cat a.txt
94,aqqc,62345907,
5,aeec,77,
# cat 1.pl
#!/usr/bin/perl
use strict;
use warnings;
use Date::Manip;
open(my $FA, "/root/a.txt") or die "$!";
while(<$FA>) {
chomp;
my @tmp=split(/\,/, $_);
if (index($tmp, "qq") ne -1) {
... (4 Replies)
Hi,
I have a script which runs daily. It gets 3 input files test1,test2,test3. I want to do a validation in my script to make sure i have all the 3 files available before running. If any one of the file is missing i want to break the script.
Could you please help me with this request.
... (1 Reply)
Hi,
I have a file of the following format:
AV 103
AV 104
AV 105
AV 308
AV 517
BN 210
BN 211
BN 212
BN 218
and the desired output is :
AV 103-105 3
AV 308 1
AV 517 1
BN 210-212 3 (5 Replies)
i want to get input and depending on it create new commands for input to expect.
But problem is that after giving date or month as 01-09 it is interpretation as 1-9
echo -n "ENTER DATE "
read d1
echo -n "ENTER MONTH "
read m1
echo -n "ENTER YEAR"
read y1
o=1
i=1
d2=`expr $d1... (1 Reply)
Hello Sir/Madam,
I'm new to UNIX and wondering if I can process a find & add using AWK command in UNIX?
requirements: I have to find *.JPG field for each line in the input file and add it as a separate field for each line.. for ex:
0000684631,E,3088017,7... (10 Replies)
HI
Input file.txt
ABCDE1 JFHFJFJF3 10
ABCDE2 JFHFJFJF5 20
ABCDE3 JFHFJFJF5 30
ABCDE4 JFHFJFJF6 -
ABCDE5 JFHFJFJF6 20
ABCDE6 JFHFJFJF6 90
ABCDE7 JFHFJFJF6 9
ABCDE8 JFHFJFJF6
I want to check third column if data missing or wrong data the echo massage and out from script.
1.... (8 Replies)
I have a file number.txt.I need to get 2 inputs from the terminal like a=100 and b=200.If a and b are there in the file,then check if a < b,print "less".If a is not there in the file,print "a is missing" or if b is not there in the file,print "b is missing".
number.txt:
100 200 300 (2 Replies)
I need a script to check the records in a file , if any value match transfer the record in error.txt file.
1- If any of the any field value is NULL(nothing in this field)
Record1|Record2|Record3|Record4|Record5|DATE1|DATE2
Example:
11111111|22222222|NULL|12|444|27042018|27042018... (8 Replies)