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
OUTLOOK 2003...problem at startup
Problem of transfering data from table to txt file
BCP date format
0x75f819ad refrened memory 0x75f819ad coud not be writtin coud not be writtin
Configuring Apache web Server for multiple domains
A non-delivery report with a status code of 5.6.3
How to allow users to upload a file - via an email form - using a Perl script?
Copied oracle schema is slow
How to run a GUI based application from SQL server Task Scheduler
Forwarding Undeliverables via rules in outlook 2003