Reading contents of a unix file separated by

May 26, 2009 at 02:10:56
Specs: Macintosh
i want to read a txt file which contains a product
id(numeric) and the product name(alphanumeric)
separated by delimiter. i want to extract both into
separate variables. how do i do it using shell script?

See More: Reading contents of a unix file separated by

Report •


#1
May 26, 2009 at 03:28:54

use awk

awk -F"|" '{
   print $1,$2
}
' file


Report •
Related Solutions


Ask Question