LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack 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
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,691
Blog Entries: 8

Rep: Reputation: 1610Reputation: 1610Reputation: 1610Reputation: 1610Reputation: 1610Reputation: 1610Reputation: 1610Reputation: 1610Reputation: 1610Reputation: 1610Reputation: 1610
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


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash shell script read file line by line. Darren[UoW] Programming 49 12-12-2012 12:11 AM
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


All times are GMT -5. The time now is 05:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration