LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-18-2004, 08:22 PM   #1
labob
LQ Newbie
 
Registered: Nov 2004
Posts: 1

Rep: Reputation: 0
Creating mult command alias in BASH


Hello. Two part question if I may.

1) If I create a .bashrc alias that has more than one command, thus separated by a semi colon, do I put a quote mark around each command, or just the full alias string? For instance:
Code:
alias test='comand number one' ; 'command number two' 
or
alias test='command number one ; command number two'
2) If I create a multi command alias and one of the commands results in a prompt for input (such as password) that suspends activity, will the remaining commands in the alias carry out after the prompt is responded to, etc.? I'm thinking of creating a backup routine that first dumps the mysql database, then tars certain directories, but the database dump will prompt me for my mysql password and is why I was wondering if the remaining commands will wait for me to respond to that prompt?

TIA
 
Old 11-18-2004, 08:37 PM   #2
Steel_J
Member
 
Registered: Oct 2004
Location: Montreal, Canada
Distribution: Kubuntu 10.04, Mint 8 and Puppy 4.3.1
Posts: 355
Blog Entries: 1

Rep: Reputation: 31
I can only answer question 1) and it's a quote around each command.
 
  


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
Need advice on creating an alias thorney Linux - General 2 11-27-2005 08:33 PM
Apache - creating an alias to access a cd-rom or DVD. verlossen Linux - Software 2 11-23-2005 07:14 AM
Lost pane,issues when creating alias from the bash shell spoult Linux - Software 2 04-19-2005 07:22 AM
Creating an alias (name=value pair) where the name has spaces. Cubert Linux - Newbie 2 01-12-2005 07:42 AM
problem creating an alias to mount a drive j_l_ajaste Linux - Newbie 6 07-01-2003 11:41 PM


All times are GMT -5. The time now is 06:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration