I was using the following bash command inside the emacs compile command to search C++ source code:
grep -inr --include='*.h' --include='*.cpp' '"' * | sed "/include/d" | sed "/_T/d" | sed '/^ *\/\//d' | sed '/extern/d'
Emacs will then position me in the correct file and at the correct line... (0 Replies)
I know this should be simple, but I've been manning sed awk grep and find and am stupidly stumped :(
I'm trying to use sed (or awk, find, etc) to find 4 characters on the second line of a file.txt 44-47 characters in. I can find lots of sed things for lines, but not characters. (4 Replies)
Hello all
Hoping someone would be kind enough to suggest a solution to a problem i have, and see if maybe i can even do this without a script.
Essentially i have a very large log file, and within it each line had a value called TTMT, and it records a variable number in the following way, so... (6 Replies)
Hey guys, I'm fairly new at unix shell scripting and I have a quick question.
Quick overview I devolped a script where I generate a file ..and I want to grep any time greater than 30 minutes.
What i do is runa command to generates the below and puts it into a file:
I run
./ggsci << endit... (4 Replies)
Hi,
I have a dynamically growing ascii file which has large data (both text and digits). I need to grep those lines having value greater than '123'. These numeric values may appear at anywhere in the line, hence I could not use awk to split to columns.
So, please help me with the grep regular... (12 Replies)
I'm trying to grep lines where the digits at the end of each line are greater than digits. Tried this but it will only allow me to specify 2 digits. Any ideas would greatly be appreciated. grep -i '\<\{3,4,5\}\>' file
---------- Post updated at 05:58 PM ---------- Previous update was at 05:41... (1 Reply)
Hi, This is my first post.
I have a korn shell script which outputs a select statment to a file. There is only one column and one row which contains a record count of the select statement.
The select statement looks something like this:
SELECT COUNT(some_field) AS "count_value"
... (2 Replies)
HI All
Im trying to come up with an approach to finding a string, using a portion of that string to insert it on lines starting with the value "GOTO" appending to end of line after removing PT's ( See example below! )
EXAMPLE:
1. I would like to search for the line that starts with "TLAXIS/"... (7 Replies)
Hi Team,
I have a file a1.txt with data as follows.
dfjakjf...asdfkasj</EnableQuotedIDs><SQL><SelectStatement modified='1' type='string'><!
The delimiter string: <SelectStatement modified='1' type='string'><!
dlm="<SelectStatement modified='1' type='string'><!
The above command is... (7 Replies)
Discussion started by: kmanivan82
7 Replies
LEARN ABOUT DEBIAN
algorithm::checkdigits::m11_013
CheckDigits::M11_013(3pm) User Contributed Perl Documentation CheckDigits::M11_013(3pm)NAME
CheckDigits::M11_013 - compute check digits for VAT Registration Number (GR)
SYNOPSIS
use Algorithm::CheckDigits;
$ustid = CheckDigits('ustid_gr');
if ($ustid->is_valid('123456783')) {
# do something
}
$cn = $ustid->complete('12345678');
# $cn = '123456783'
$cd = $ustid->checkdigit('123456783');
# $cd = '3'
$bn = $ustid->basenumber('123456783');
# $bn = '12345678';
DESCRIPTION
ALGORITHM
1. Beginning right with the digit before the checkdigit all digits are weighted with 2 ** position. I. e. the last digit is multiplied
with 2, the next with 4, then 8 and so on.
2. The weighted digits are added.
3. The sum from step 2 is taken modulo 11.
4. If the sum from step 3 is greater than 9, the check sum is 0 else it is the sum itself.
METHODS
is_valid($number)
Returns true only if $number consists solely of numbers and hyphens and the two digits in the middle are valid check digits according
to the algorithm given above.
Returns false otherwise,
complete($number)
The check digit for $number is computed and inserted into the middle of $number.
Returns the complete number with check digit or '' if $number does not consist solely of digits, hyphens and spaces.
basenumber($number)
Returns the basenumber of $number if $number has a valid check digit.
Return '' otherwise.
checkdigit($number)
Returns the check digits of $number if $number has valid check digits.
Return '' otherwise.
EXPORT
None by default.
AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
SEE ALSO
perl, CheckDigits, www.pruefziffernberechnung.de,
perl v5.10.0 2008-05-17 CheckDigits::M11_013(3pm)