Microsoft
Software
Hardware
Network
Question : parsing a string using Shell script
How do I parse a string and retrieve the last 3 digits and add 4 to the start of the 3 digits
the string could be in following formats:
customer100
cust100
I need to retrieve the last 3 digits and add 4 to that. i.e 4100 in shell script. Please advise.
Answer : parsing a string using Shell script
1: 2: 3:
#!/bin/ksh string='customer100' echo 4${string##[a-z]*[a-z]}
Open in New Window
Select All
Random Solutions
Win98se Won't Boot Up, Can Hear Fan, Monitor says "No Signal"
How to increase rules in outlook 2007
ASA Audit Trigger -- Get Column Name
Screen capture Freeware for windows XP
Publishing my documents in citrix 4.5
How to plug an IDE cable from a motherboard to a laptop's Hard drive
ORA-12560: TNS:protocol adapter error
Need sample on how to acess Oracle using ojdbc14.jar
12 Rules of Codd and Oracle
Exchange 2007 is not recieving emails from external addresses but works fine with internal emails