![실제 gio 실행 명령을 인쇄하고 싶습니다(예:) $ echo "gio launch /usr/share/applications/abiword.desktop" 은 다음을 인쇄합니다: $ Exec=abiword](https://linux55.com/image/229563/%EC%8B%A4%EC%A0%9C%20gio%20%EC%8B%A4%ED%96%89%20%EB%AA%85%EB%A0%B9%EC%9D%84%20%EC%9D%B8%EC%87%84%ED%95%98%EA%B3%A0%20%EC%8B%B6%EC%8A%B5%EB%8B%88%EB%8B%A4(%EC%98%88%3A)%20%24%20echo%20%22gio%20launch%20%2Fusr%2Fshare%2Fapplications%2Fabiword.desktop%22%20%EC%9D%80%20%EB%8B%A4%EC%9D%8C%EC%9D%84%20%EC%9D%B8%EC%87%84%ED%95%A9%EB%8B%88%EB%8B%A4%3A%20%24%20Exec%3Dabiword.png)
나는 다음과 같은 것을 사용할 수 있다는 것을 알고 있습니다.
grep Exec= /usr/share/applications/abiword.desktop
비슷한 작업을 수행할 수도 있습니다.
abiword=$(grep Exec= /usr/share/applications /abiword.desktop)
그런 다음:
echo "$abiword"
나는 똑같은 일을 하고 싶지만 text 를 사용하고 싶습니다 gio launch
.
현재 스크립트에서 $abiword
및 gio launch
텍스트를 사용하고 있는데 스크립트를 조금 정리하고 싶습니다. 텍스트에서는 gio launch
호출되지 않는 일부 응용 프로그램을 호출합니다 $abiword
. 그런 다음 gio launch
다양한 매개변수를 텍스트에 추가하여 애플리케이션의 다양한 측면을 호출합니다.
예를 들어 다음과 같이 시도했습니다.
echo `gio launch /usr/share/applications/abiword.desktop`
echo '`gio launch /usr/share/applications/abiword.desktop`'
echo "`gio launch /usr/share/applications/abiword.desktop`"
Magic Spell 1x를 우연히 발견했기 때문에 이것이 가능하다는 것을 알고 있지만 고양이 발을 스와이프하면 사라졌습니다.
이상적으로 이것은 내 스크립트에서 사용할 변수로 변환됩니다.