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 -->
#
3
(
permalink
)
02-14-2008
bakunin
Bughunter Extraordinaire
Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,633
As the pipe symbol is the last char in the line it is matched by "|$". From there it is easy to construct the following regexp:
sed
's/.*\([NU]\)|$/\1/'
i hope this helps
bakunin
bakunin
View Public Profile
Find all posts by bakunin
Find bakunin's past nominations received
Find bakunin's present nominations given