LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-13-2005, 05:49 AM   #1
hansi umayangan
Member
 
Registered: Aug 2004
Distribution: AS3
Posts: 81

Rep: Reputation: 15
bash shell command line expansion


It is difficult to edit /etc/exports by looking at man 5 exports command out put

how can I pass the required line in man 5 exports command
out put to the /etc/exports file

eg:- I think it is something similar to this

man 5 exports | grep '^/projects' >> /etc/exports
 
Old 03-13-2005, 06:28 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I'm not entirely sure what it is you want to accomplis, but this:

man 5 exports | col -b | grep '^ [ ]*/'

greps the example lines from the exports manpage. Placing >> /etc/exports will append the output to the /etc/exports file.

But these lines from man exports are examples and need to be changed for your particular setup.

BTW: It would be easier to have 2 terminals open, one for editing the /etc/exports file and one with the man page. You can copy/paste the parts you need.

Hope this helps.
 
Old 03-13-2005, 11:31 AM   #3
hansi umayangan
Member
 
Registered: Aug 2004
Distribution: AS3
Posts: 81

Original Poster
Rep: Reputation: 15
Thank you it is really works over here
 
  


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
bash shell script read file line by line. Darren[UoW] Programming 57 04-17-2016 06:07 PM
Bash Script, no new line for echo command jorisb Linux - General 5 11-05-2005 12:08 AM
about the bash shell command naihe2010 Programming 7 10-27-2005 12:40 AM
bash, command line ftp, and a delimma.. scoob8000 Linux - Networking 2 03-18-2005 05:22 PM
Scripts failing with #!/bin/bash or other shell on first line rdfoerster Fedora 6 11-16-2004 07:46 PM

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

All times are GMT -5. The time now is 02:22 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