Sponsored Content
Full Discussion: Small Help on SED
Top Forums Shell Programming and Scripting Small Help on SED Post 302089473 by Chanakya.m on Tuesday 19th of September 2006 08:34:27 AM
Old 09-19-2006
thank you aigles .. i got it
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

small unix!

i'm looking to put a very minimal unix on a 386 i just acquired. it needs to be downloadable and i need to install it using 3.5 floppies! thanks for suggestions, -nydel (4 Replies)
Discussion started by: nydel
4 Replies

2. UNIX for Dummies Questions & Answers

Sed working on lines of small length and not large length

Hi , I have a peculiar case, where my sed command is working on a file which contains lines of small length. sed "s/XYZ:1/XYZ:3/g" abc.txt > xyz.txt when abc.txt contains lines of small length(currently around 80 chars) , this sed command is working fine. when abc.txt contains lines of... (3 Replies)
Discussion started by: thanuman
3 Replies

3. UNIX for Advanced & Expert Users

Two small queries

Query 1 : How to check if a directory already exists? If doesn't exist then create a new one. Query 2 : I want to put following text using a single echo statement into a log file and also want to retain the formatting of the text. How it can be... (3 Replies)
Discussion started by: skyineyes
3 Replies

4. Shell Programming and Scripting

small sed script on command line.

Can anyone help me get this small sed script to work in shell on the command line? I need it in a one liner really as i want to edit many scripts in a for loop and dont want to have to invoke a separate script each time. #!/bin/sh sed '/mailx\ -s.*$ { i\ #Comment above mailx line ... (5 Replies)
Discussion started by: lavascript
5 Replies

5. Shell Programming and Scripting

Need small help

Hi, i have a client requirement to post the files into generic folder named as "source".file identification is to retrieve Publication code (Instance name) from the file name.So thereafter we move the files to different instances of specific folders for the same unix server.(means if the file... (2 Replies)
Discussion started by: kirankumar
2 Replies

6. Shell Programming and Scripting

sed parse small xml file

I have a tmp.xml file like: <?xml version="1.0" encoding="UTF-8"?> <Response> <Ip>193.143.121.198</Ip> <Status>OK</Status> <CountryCode>PL</CountryCode> <CountryName>Poland</CountryName> <RegionCode>82</RegionCode> <RegionName>Pomorskie</RegionName> <City>Gdansk</City> ... (9 Replies)
Discussion started by: unclecameron
9 Replies

7. Shell Programming and Scripting

SED help, small problem

Hi, I have this sed command to grep a date from a filename for a script we have. I am awful with sed so I need help. Sometimes it works fine but other times it does not, see below. works bash-3.00# echo... (1 Reply)
Discussion started by: GermanJulian
1 Replies

8. Shell Programming and Scripting

Need small help

Hi all, I have two files in my folder 1.index.jsp 2.maintenance.jsp Once hit the URL in IE,It will call the index.jsp file than application working fine. I want to some maintenance in my application, during the application maintenance than it will... (1 Reply)
Discussion started by: lkeswar
1 Replies

9. What is on Your Mind?

A small irritation

I thought I post about a small irritation that I have been having for years, in fact ever since CDs came out, which is a good 25 years now. For some reason, CD player manufacturers do not design their tray to come out completely and leaving about 1cm or 2cms of the tray in the system, so that it is... (8 Replies)
Discussion started by: figaro
8 Replies

10. Shell Programming and Scripting

need a small help

Hi, sorry for inconvenience..wrong query posted. Thanks for your help. Thanks (1 Reply)
Discussion started by: kirankumar
1 Replies
CheckDigits::M11_010(3pm)				User Contributed Perl Documentation				 CheckDigits::M11_010(3pm)

NAME
CheckDigits::M11_010 - compute check digits AHV number (CH) SYNOPSIS
use Algorithm::CheckDigits; $ahv = CheckDigits('ahv_ch'); if ($ahv->is_valid('123.45.678.113')) { # do something } $cn = $ahv->complete('123.45.678.11'); # $cn = '123.45.678.113' $cd = $ahv->checkdigit('123.45.678.113'); # $cd = '3' $bn = $ahv->basenumber('123.45.678.113'); # $bn = '123.45.678.11'; DESCRIPTION
ALGORITHM 1. Beginning left every digit is weighted with 5,4,3,2,7,6,5,4,3,2. 2. The weighted digits are added. 3. The sum from step 2 is taken modulo 11. 4. The checkdigit is 11 minus the sum from step 3. Is the difference 10, the number won't be taken. If the difference is 11, the checkdigit is 0. 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_010(3pm)
All times are GMT -4. The time now is 10:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy