We need to filter only the application ID on notebookApp application:
yarn application -list | grep notebookapp | awk '{print 1ドル}' | grep -v INFO
25/04/24 08:30:31 INFO client.AHSProxy: Connecting to Application History server at pluto01/53.23.21.2:10200
25/04/24 08:30:31 INFO client.ConfiguredRMFailoverProxyProvider: Failing over to rm2
application_1745386419514_0015
While expected results:
application_1745386419514_0015
The ugly way is to redirect the output to file
yarn application -list | grep notebookapp | awk '{print 1ドル}' >/tmp/app_id.txt
and then capture the application ID from the file:
APP_ID=$(cat /tmp/app_id.txt)
but we do not want to redirect the results to file.
jonrsharpe
123k31 gold badges278 silver badges489 bronze badges
asked Apr 24, 2025 at 8:48
King David
5722 gold badges7 silver badges21 bronze badges
APP_ID=$(yarn application -list | grep notebookapp | awk '{print 1ドル}' | grep -v INFO)