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
File Share logging?
how to store zero values in the INT data type
Locking a jpeg signature in Adobe Professional 8.0
Cleaning Up Offline Files
Acronis Snap deploy or Ghost corporate 11
Cannot use EHLO or AUTH LOGIN outside of internal network on Exchange 2003
MS Access 2003 Report - create as pdf then email as attachment via Outlook 2003
Limiting records in Crystal Reports
How can I change the owner of a table or view
NetApp Exchange Snap Shot - EDB is in "Dirty Shutdown" state