Вот мое решение проблемы.
# assign will take last line of stdout and create an environment variable from it
# notes: a.) we avoid functions so that we can write to the current environment
# b.) aliases don't take arguments, but we write this so that the "argument" appears
# behind the alias, making it appear as though it is taking one, which in turn
# becomes an actual argument into the temporary script T2.
# example: echo hello world | assign x && echo %x outputs "hello world"
alias assign="tail -1|tee _T1>/dev/null&&printf \"export \\\$1=\$(cat _T1)\nrm _T*\">_T2&&. _T2"
Я не совсем понимаю, что вы подразумеваете под «отдельными» экземплярами Chrome. Как индивидуально это должно быть? В любом случае, есть возможность Chromium запускать несколько независимых экземпляров с параметром --temp-profile
, что может вам помочь. Описание из man
таково:
Use a throw-away/temporary profile for this session. This creates an entirely new user profile temporarily. It is not the same as incognito mode.
Вы можете легко найти дополнительную информацию по этой теме с помощью поиска в Интернете. Проведите тест в необходимом объеме.