LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-28-2008, 04:03 PM   #1
Sushy
Member
 
Registered: Sep 2005
Distribution: FreeBSD
Posts: 84

Rep: Reputation: 15
continuous (new)lines in bash


Hi.

I want to make a little bash script to automate installation of packages,
so that it would install only uncommented stuff I need.
So, something like this (syntax wrong, I know):
Code:
#!/bin/bash

apt-get install \
# some comment
ssh \
cupsys \
#samba \
finger \
#wget \
#other stuff... \
#...
But I don`t know which syntax should I use to append multiple continious lines in one command context?
I know that the \ must be followed directly by a return. There can be NO SPACE. Is there any way I can realize my example shown above?
Of course I can write down the "apt-get install" command each time on each line but that would not be good.

Last edited by Sushy; 01-28-2008 at 04:05 PM.
 
Old 01-28-2008, 04:45 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Can you explain what the use-case for this is?


Cheers,
Tink
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how many lines and words (bash) sharapchi Programming 4 12-15-2006 12:45 PM
Bash lines wrapping Ephracis Linux - Newbie 2 09-26-2006 07:35 AM
How to grep similar lines in bash? bruno buys Linux - Software 2 12-02-2005 11:56 PM
Can't get lines of a file with a Bash script.. barisdemiray Programming 2 08-11-2004 12:42 PM
complex command lines in bash? 3inone Linux - Newbie 1 04-20-2004 06:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:40 PM.

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