Search Results

Search: Posts Made By: pravin27
4,765
Posted By pravin27
Hi, Can you try job_depends command of autosys...
Hi,
Can you try job_depends command of autosys ?
Thanks
Pravin
8,854
Posted By pravin27
Delphys, Perl one liner works at my end. It...
Delphys,
Perl one liner works at my end. It would be helpful if you could attached part of your i/p file.
~Pravin~
8,854
Posted By pravin27
Delphys, What's the issue with perl code in...
Delphys,

What's the issue with perl code in post #6 ? Could you please post some more information (like error , o/p ) ?

~ Pravin ~
2,801
Posted By pravin27
Using Perl #!/usr/bin/perl open...
Using Perl
#!/usr/bin/perl
open (FH,"/path/to/file.txt") or die "cannot open file \n";
my $pos=0;
while (1) {
seek(FH,$pos,0);
while (<FH>) {
print $_;
}
$pos=tell(FH);
}
9,915
Posted By pravin27
echo ",750,0000000000000000GCJR, ,06/22/2016...
echo ",750,0000000000000000GCJR, ,06/22/2016 11:48:44" | awk -F"," '{
hr=substr($NF,12,2);
if (hr > 11) { b="PM"
hr-12 == 0 ? nhr=hr : nhr=hr-12
} else { b="AM";nhr=hr}
printf "%s%02d%s...
9,915
Posted By pravin27
date -d "06/22/2016 14:48:44" '+%m/%d/%Y...
date -d "06/22/2016 14:48:44" '+%m/%d/%Y %r'
4,367
Posted By pravin27
Prohank, Suppose file contains 5 columns,...
Prohank,

Suppose file contains 5 columns, key fields are 1, 2 and agg field is 5.
What about field no 3 and 4. Do we suppose to agg or ignore ?

Thanks
Pravin
2,094
Posted By pravin27
Using Perl use Net::FTP my...
Using Perl

use Net::FTP
my $flagFile="flag.file";
my $ftp = Net::FTP->new("host") or die "cannot connect \n";
$ftp->login("user","passwd") or die "cannot login \n";
my...
6,304
Posted By pravin27
try below code rsync -rv --dry-run ...
try below code
rsync -rv --dry-run --include='*/*/Subsub1/*' --exclude='*/*/Subsub2/*' ./RootFolderI/ ./RootFolderII/
Remove --dry-run option if you are good with o/p
1,791
Posted By pravin27
Hi , Try new code from post #6. Thanks ...
Hi ,
Try new code from post #6.

Thanks
Pravin
1,791
Posted By pravin27
yes, You can modify code as below. awk...
yes, You can modify code as below.
awk 'NR==1{first=$0;prev=$0;next }
$0 - prev == 1 { prev=$0; next } { if (first != prev) { print first,prev;} else { print prev} prev=$0;first=$0 } END { print ...
6,564
Posted By pravin27
export Numbr_Parms=$# export a=1 while [ $a...
export Numbr_Parms=$#
export a=1
while [ $a -le $Numbr_Parms ]
do
eval export DBName_$a=\$$a
echo DBName_$a
eval echo \$$DBName_$a
a=`expr $a + 1`
done
1,791
Posted By pravin27
RavinderSingh13, One doubt here , why 179 183...
RavinderSingh13,
One doubt here , why 179 183 is in your o/p
o/p in the post of before4 does not include it.
Little modification if you want to exclude 179 183
awk 'NR==1{first=$0;prev=$0;next }...
1,512
Posted By pravin27
1) Please use code tag 2) What have you tried...
1) Please use code tag
2) What have you tried so far ?
1,561
Posted By pravin27
try below awk '{if (a[$1FS$2FS]) {a[$1FS$2FS]...
try below
awk '{if (a[$1FS$2FS]) {a[$1FS$2FS] =a[$1FS$2FS]","$3} else {a[$1FS$2FS]=$3}} END {for (key in a) { print key a[key]}}' testfile
4,455
Posted By pravin27
try this find . -type f \( -name '*SQLite*' -o...
try this
find . -type f \( -name '*SQLite*' -o -name '*XML*' \) -exec ls -ltr {} + | awk '{filename=$NF;$NF="";printf $0" ";system ("/usr/bin/file "filename); }'
1,961
Posted By pravin27
Could you please provide some more information ?...
Could you please provide some more information ? What is desired o/p ?
1,585
Posted By pravin27
Hi RudiC, I think solution need 6 character to...
Hi RudiC,
I think solution need 6 character to extract instead 7 substr($1, 5, 7)

Thanks
Pravin
1,673
Posted By pravin27
using perl my...
using perl
my $sourceFile="/v/global/user/b/bh/bharade/Programs/Forum_Scripts/Layout.txt";
my $targetFile="/v/global/user/b/bh/bharade/Programs/Forum_Scripts/abc.txt";

open(FH1,"$sourceFile") or...
1,673
Posted By pravin27
what about field(s) from position 4 to 9 . Could...
what about field(s) from position 4 to 9 . Could you please provide your input file

I am assuming layout.txt will have all the fields in ascending order with no. of characters seperated by...
3,019
Posted By pravin27
You can use getline in awk to get the desire...
You can use getline in awk to get the desire output. i have modified your code as below.
nawk '{print " " $NF}' line2 > nawk6
nawk '
{CNF = (length()-10)/7
...
1,199
Posted By pravin27
remove line last LINE; and try .
remove line last LINE; and try .
3,076
Posted By pravin27
You need convert it to seconds so you can use...
You need convert it to seconds so you can use comparison operator in condition. Date format (2016-02-28) is not an integer , that's why script was throwing an error.
3,019
Posted By pravin27
You can modify your for loop as below. for...
You can modify your for loop as below.
for (i=2; i<=CNF+2; i++) {printf "%7s", T[i]; if ( i == 19) {printf "%7s", "2.979"}}
3,076
Posted By pravin27
Convert your date to seconds and then compare. ...
Convert your date to seconds and then compare.
dProcDate="2016-02-29"
dCurrent="2016-05-31"

dProcDate_sec=$(date -d"$dProcDate" '+%s')
dCurrent_sec=$(date -d"$dCurrent" '+%s')

if [...
Showing results 1 to 25 of 500

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