The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 04-10-2007
reborg's Avatar
reborg reborg is online now Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,242
ksh/bash
1.

Code:
$ a=abc@yahoo.com 
$ echo ${#a}
13


Code:
$ echo "abc.|de" | awk -F'.|' '{ print $1}'
abc

(note not all awks will allow this, on solaris use nawk)