Nov 22, 2001 #1 pd123 Programmer May 22, 2001 48 GB In a shell script I have a variable con1 = "filename,table" I want to parse this string and split at the ',' to create 2 new variables for each value eg. Store 'filename' in a variable and 'table' in a variable Thanks.
In a shell script I have a variable con1 = "filename,table" I want to parse this string and split at the ',' to create 2 new variables for each value eg. Store 'filename' in a variable and 'table' in a variable Thanks.
Nov 22, 2001 #2 grega Programmer Feb 2, 2000 932 GB One method would be ... VAR1=$(echo $CON1 | cut -d, -f1) VAR1=$(echo $CON1 | cut -d, -f2) Greg. Upvote 0 Downvote
Nov 22, 2001 #3 grega Programmer Feb 2, 2000 932 GB One method would be ... VAR1=$(echo $CON1 | cut -d, -f1) VAR2=$(echo $CON1 | cut -d, -f2) Greg. Upvote 0 Downvote
Nov 22, 2001 #4 grega Programmer Feb 2, 2000 932 GB .. ignore that 1st reply .. Greg. Upvote 0 Downvote
Nov 22, 2001 Thread starter #5 pd123 Programmer May 22, 2001 48 GB I wasn't sure on the best place to post it. Thanks anyway. Upvote 0 Downvote