LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 08-13-2010, 03:11 PM   #1
wertum
Member
 
Registered: Jul 2010
Location: usa
Distribution: ubuntu
Posts: 39

Rep: Reputation: 16
How i do create autostart script for UpStart ?


How i do create autostart script for UpStart ?

I want autostart this commands with UpStart:
mkdir /home/user/_1_
mkdir /_1_

p.s: ... or give me links for FAQ's
 
Old 08-13-2010, 09:59 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,272
Blog Entries: 28

Rep: Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123
Machtelt Garrels writes great manuals.

http://tille.garrels.be/training/bash/

Probably all you need is this, based on your original post. You need to tell the script where to find bash:

Code:
#!/bin/bash
mkdir /home/user/_1_
mkdir /_1_

I've written only a few scripts and most of them are just "do this," then "do this," and so on.

One lesson I have learned is to test the commands, write the script, then test the script. And test the script. And test the script.

Klaatu did a great tutorial on bash scripting in his July 12, 2010, podcast. Unfortunately, he doesn't provide a way to link to specific episodes, but here's his website. Look for episode 5x16.
 
Old 08-13-2010, 11:37 PM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,999

Rep: Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190
Do you actually need this to be carried out regularly? If you place a script that can be read by upstart it will need to be associated
with an event. However if it is just something to be done once you login then place it in your .bash_profile
 
  


Reply


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
KDE 4 Autostart Program Bash Script to Write Autostart Bash Scripts for You! jdmcdaniel3 SUSE / openSUSE 1 05-03-2010 06:17 AM
Shell script adding autostart gnome script Coolrunr Programming 3 01-01-2009 02:23 PM
Setting up an autostart script ryan0204 Linux - Software 2 07-10-2005 05:04 PM
How do I create a script to start up in .kde/Autostart? Slovak Slackware 11 11-30-2004 06:21 PM
AutoStart a Script extremebfn Slackware 2 09-11-2004 09:25 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:15 AM.

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