In a file, there is:
sd5_crypt UUID=1337 none luks,discard
I'd like to change it to:
sd5_crypt UUID=1337 /dev/disk/by-label/MON_LABEL_ICI:/keyfile luks,keyscript=/lib/cryptsetup/scripts/passdev
with a Shell script.
I dont know (blind) if it is sd5, sd4 or sx999... I dont know the UUID.
I have to change all what is after 1337.
Well, said humanly "I delete all after the UUID number - I dunno it - and replace with /dev/dis/by-label....
which I know.
I dont know which is the good solution. Can you help please ?
sed -e 's/none luks,discard/YOURPATH luks,THEREST/g'
-e
not-i ?