Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-17-2005, 06:42 PM   #1
Registered: May 2005
Location: Winnipeg, Canada
Distribution: mostly mepis
Posts: 427

Rep: Reputation: 30
Rookie needs script help

Most of you programmers may laugh at this, but I've never tried to write a shell script before so please bear with me.
I downloaded a p2p program named Museek that has 2 parts. Museekd is a daemon that connects to the Soulseek network. Museeq is the graphical frontend. I wanted to launch Museeq from Kmenu so I stole pieces of other scripts and put this together;

#! /bin/bash
# museek startup
museekd &
kill `ps x | grep -w "museek[d]" | cut -c1-6`

I know this is probably rubbish but it works (so far). My question is how would this be constructed in a proper script ? Just the general idea please, I want to try to work out the details myself. Thanks for any suggestions.
Old 10-17-2005, 06:52 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
That's basically it, just get rid of the space between the
#! and the /bin/bash

Also a "skill -9 museekd" is slightly prettier than your
approach ;}

Old 10-17-2005, 07:06 PM   #3
Registered: May 2005
Location: Winnipeg, Canada
Distribution: mostly mepis
Posts: 427

Original Poster
Rep: Reputation: 30
The space didn't seem to cause a problem but I will remember that for next time. Will try that kill line. Thanks much.
Old 10-17-2005, 07:16 PM   #4
LQ Guru
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
You can use pkill command as well if on your system.
pkill museekd



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mepis Rookie kraydl MEPIS 10 10-23-2005 06:37 PM
rookie at work hannible808 Linux - Software 2 11-28-2004 12:15 PM
rookie compiling zabir Linux - Newbie 1 09-24-2004 12:25 PM
hi, question of a rookie Killah Linux - Hardware 2 02-17-2004 02:10 PM
Linux Rookie woodyjohnson425 Member Intro 3 06-13-2003 07:57 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration