How to parse a string to retrieve the words in the string in variables using shell script? -
I have a command that gives the following output when executed
$ cleartool Pwv Work directory view: abhijeet_trialProj_r2.4-phase1_ba_abhijeet_branch Set View: abhijeet_trialProj_r2.4-phase1_ba_abhijeet_branch $ cleartool PWV Work directory view: ** Any set **: abhijeet_trialProj_r2.4-phase1_ba_abhijeet_branch $ CT PWV Work directory view: ** any ** SET VIEW: * * None **
I use this command "Claytonal PVVV" in a shell script. I am. $ View_used string "Working directory view: ** is not set
2.4-step1_b_abg_rarap "
I need to retrieve two values from $ values_used
work_dir_view =" **** none **** "or" Abhijit_triel prows_r -2.4-step1_b_jhijit_brunch "
set_view =" **** none **** "or" abhijit_trael proz_r -2.4-step 1_b_b
front Thank you.
var = $ (cleartool pwv | awk -F): See '' / Task Directory / {T = $ 2} text "itemprop =" text "> / set = / s = $ 2} END {print t, s} ') - $ var resize $ 1 Echo $ 2
with shell (bash) scripting
while IFS = ": read -rab" $ a "in" work directory " "*) W =" $ b ";; * "Set view" *) s = "$ b" ;; ASAC did & lt; "File1" echo "$ w" resonant "$ s"
Comments
Post a Comment