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
Trigger PDF Download in Flash
Chinese Windows Vista 32 translating to english?
Can't ping new SBS Install
Sending Special Character(PAGE DOWN) to Net::Telnet
Lp command
Microsoft OLE DB Provider for SQL Server error '80040e31' Timeout expired (Unrelated to Connection or ASP script Timeout Properties)
Gmail change the mail from name.
MAC - WINDOWS NETWORKING
Can I run a PowerShell script on a XP Pro computer with out installing any additional software to make the script run
Multiple Like Statements -- more effiicient?