10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: vivekn
8 Replies
2. Shell Programming and Scripting
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)
Discussion started by: aneeta13
2 Replies
3. Shell Programming and Scripting
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)
Discussion started by: pareshkp
8 Replies
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: V1l1h1
10 Replies
5. Shell Programming and Scripting
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)
Discussion started by: sagar_1986
1 Replies
6. Shell Programming and Scripting
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)
Discussion started by: rochitsharma
5 Replies
7. Shell Programming and Scripting
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)
Discussion started by: Krrishv
1 Replies
8. Shell Programming and Scripting
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)
Discussion started by: jimmy_y
4 Replies
9. Shell Programming and Scripting
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)
Discussion started by: newpromo
4 Replies
10. Shell Programming and Scripting
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)
Discussion started by: aemunathan
7 Replies