Microsoft
Software
Hardware
Network
Question : need last three characters of the string
I need last three chaarcters of string . I have series of of file names
somefilename1.xyz112
somefilename2.abc121
...
I need to get last three characters(112 or 121 or 131 etc which are version numbers which I reuse later)
thanks in advance
Answer : need last three characters of the string
Sorry.. You misplaced the brackets and $ from my original comment.. If you do so, it won't work.
1: 2:
export version=`echo $file_name | sed 's/.*\(...\)$/\1/'` echo $version
Random Solutions
Script to automatically delete files older than 1 month Windows NT server
How to get an USB speaker to work with Eee PC 900 Xandros Linux
Windows Update site fails to load
How to register nameserver
OutlookAnywhere for Exchange 2007 - client keeps asking for credentials
Reasons to define UDT..
Need a regular expression
Batch script to calculate elapsed time in seconds : must be able to handle if time crosses midnight
SQL Server find sequnce of same values
'SettingsSingleFileGenerat
or' 'ResXFileCodeGenerator' problem