: #$$$$ # # @(#)extractcol 1.00 # # NAME # extractcol - Extract columns # # SYNOPSIS # extractcol < export_file > output_file # # DESCRIPTION # Extracts specific columns from a BuildPro object export # list. # # SYNTAX # extractcol < export_file > output_file # # where: # 'export_file' is the BuildPro generated object export file # containing comma delimited object properties. # 'output_file' output file containing extracted columns. #$$$$ #============================================================================= # Replace delimiter with a single character (in this case pipe) #============================================================================= sed 's/","/|/g' > /tmp/extractcol$$ #============================================================================= while read string do #===================================================================== # Edit here to select the columns to extract: #===================================================================== col2=`echo $string | cut -d\| -f2` col3=`echo $string | cut -d\| -f3` #col16=`echo $string | cut -d\| -f16` echo $col2 $col3 done < /tmp/extractcol$$ #============================================================================