The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
extraction of last but one char
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
extraction of last but one char
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
02-14-2008
ghostdog74
Registered User
Join Date: Sep 2006
Posts: 2,557
you can use awk, set the field separator FS to "|", then use the NF inbuilt variable to get the last field. for the last second field, use NF-1. to get that value, prepend dollar sign, eg $(NF-1)
ghostdog74
View Public Profile
Find all posts by ghostdog74
Find ghostdog74's past nominations received
Find ghostdog74's present nominations given