Dear friends
I am new to linux and was trying to split some files userwise in our linux server.
I have a data file of 156 continuous columns named ecscr final.
I want the script to redirect all the lines containing a pattern of 7 digits to separate files. I was using grep to do that,... (2 Replies)
Hi,
I have a log file which contains lines like below:
2010-07-19 07:13:19,021 ERROR system ...(text)
2010-07-19 07:22:03,427 ERROR system ...(text)
class com... (text)
2010-07-19 07:23:19,026 ERROR system ...(text)
class com... (text)
each line is a separate line... I am given the a... (14 Replies)
Hi All,
I have the below file data.txt.Using awk i want to grep all the zone data.Form the below command i can extact data upto of zone i give but i want it should print until next pattern.
awk '/^Total Collection /{c=5;next}c-->0' zin45srs08.tools_utilization
instead of c=5 is it possible... (5 Replies)
Hi All,
I am trying to find numbers with balance greater than 1 and less than equal 2 from the below file using awk
Input file
num ,bal
100199,1.708
100225,0
100226,0
100228,0.771166
100232,2
output file
100199,1.708
100232,2
I am using the following command for this... (2 Replies)
Hello Guyz
I have been following this forum for a while and the solutions provided are super useful. I currently have a scenario where i need to search for a pattern and start searching by keeping the first pattern as a baseline
ABC
DEF
LMN
EFG
HIJ
LMN
OPQ
In the above text i need to... (8 Replies)
Hi,
I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)
Discussion started by: Pradhikshan
9 Replies
7. Post Here to Contact Site Administrators and Moderators
In file, we have millions of records each of 1000 in length. And at specific position say 800 there is a space, we need to replace it with Character X if the ID in that row starts with 123.
So far i have used the below which is replacing space at that position to X but its not checking for... (3 Replies)
Input data as below (filetest.txt):
1|22 JAN Minimum Bal 20.00 | SAT
2|09 FEB Extract bal 168.00BR | REM
3|MIN BAL | LEX
Output should be:
( If there is Date & Month in 2nd field of Input file, It should be seperated else blank. If There is Decimal OR Decimal & Currency in last of the 2nd... (7 Replies)
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Hello,
We have wrote shell script for multiple file name search pattern.
file format: <numner>_<20180809>.txt
starting with single number and ending with 8 digits number
Command:
awk -v string="12_1234" -v serch="^+_+$" "BEGIN{ if (string ~/serch$/) print string }"
If sting matches... (4 Replies)
Discussion started by: koti_rama
4 Replies
LEARN ABOUT DEBIAN
algorithm::checkdigits::m07_001
CheckDigits::M07_001(3pm) User Contributed Perl Documentation CheckDigits::M07_001(3pm)NAME
CheckDigits::M07_001 - compute check digits modulo 7 method 1
SYNOPSIS
use Algorithm::CheckDigits;
$m001 = CheckDigits('m001');
if ($m001->is_valid('1234567892')) {
# do something
}
$cn = $m001->complete('123456789'); # $cn = '1234567892'
$cd = $m001->checkdigit('1234567892'); # $cd = '2'
$bn = $m001->basenumber('1234567892'); # $bn = '123456789'
DESCRIPTION
ALGORITHM
1. All digits are added.
2. All digits at even positions are added.
3. The sum of step 1 and 2 is taken modulo 7.
4. This is the check digit.
METHODS
is_valid($number)
Returns true only if $number consists solely of numbers and the last digit is a valid check digit according to the algorithm given
above.
Returns false otherwise,
complete($number)
The check digit for $number is computed and concatenated to the end of $number.
Returns the complete number with check digit or undef if $number does not consist solely of digits.
basenumber($number)
Returns the basenumber of $number if $number has a valid check digit.
Return undef otherwise.
checkdigit($number)
Returns the check digit belonging to $number or undef if $number does not consist solely of digits.
EXPORT
None by default.
AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
SEE ALSO
perl, www.pruefziffernberechnung.de.
perl v5.10.0 2008-05-17 CheckDigits::M07_001(3pm)