Hiya, gang.
Quite a simple one for many of you, I guess - most could probably do this in their sleep! - but it's still near the start of my scripting journey for me.
As the title says, I would like to know the simplest way to assign the output from a YAD combobox to a set variable? In this case, a list of eight different primary drive partitions (sda1 through to sdh1), which I would like, in every case, to assign to the same variable....for later inclusion in another line of code.
Code: Select all
yad --form --field="Partition:CB" sda1\!sdb1\!sdc1\!sdd1\!sde1\!sdf1\!sdg1\!sdh1
Run from the terminal, whatever is selected when the 'OK' button is clicked-on returns
Code: Select all
sdx1|
......where x=anything from a → h. What I would then like to do is to assign this output - whatever it is - to the same variable each time.....probably "DRIVEPART".
Is there a simple way to do this, or is it inextricably bound-up with sed, awk, cut & all that stuff? 'Cos if I've got to find the time to learn all that, it's going to be years before I get anywhere near what I want to achieve; I don't have half as much time to play around with all this stuff as I used to....
(I've always been crap at learning languages..! For me, it's an uphill struggle....)
Any advice, comments, examples, etc, will be appreciated.....as ever.
Mike.