You are not logged in.
I want to do a launcher so when I click it I open the file manager and when I click again it closes
The code right now::
#!/bin/bash
PIDS=`ps cax | grep "dolphin" | grep "tty1"`
if [ -z "$PIDS" ]; then
echo "Process not running"
echo $PIDS
dolphin /files
else
echo "Process is running"
echo "$PIDS"
kilall dolphin
fi(I added the tty in grep because somehow when I launch this script the echo of $PIDS throws two dolphin running in /dev/pts regardless of if dolphin is running or not)
This is exteremely simple but I can't find how to make it work!!
I'd appreciate any idea
Thank you ![]()
Offline
You might want to check out pgrep
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline