LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Password
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.

Notices


Reply
  Search this Thread
Old 08-24-2021, 04:25 PM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 128,634

Rep: Reputation: 118Reputation: 118
LXer: How to include options in your Bash shell scripts


Published at LXer:

Terminal commands usually have options or switches, which you can use to modify how the command does what it does. Options are included in the POSIX specification for command-line interfaces.read more

Read More...
 
Old 08-24-2021, 06:38 PM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,910

Rep: Reputation: 5027Reputation: 5027Reputation: 5027Reputation: 5027Reputation: 5027Reputation: 5027Reputation: 5027Reputation: 5027Reputation: 5027Reputation: 5027Reputation: 5027
The convention is for GNU long-options to be separated from their option argument by a '=', never a space. Many devs get this wrong, so I guess this article is not alone in that.

Personally, I prefer to use bash's getopts for option processing in shell-scripts.
 
  


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
LXer: Adding arguments and options to your Bash scripts LXer Syndicated Linux News 0 05-19-2021 08:18 PM
LXer: Python Scripts as a Replacement for Bash Utility Scripts LXer Syndicated Linux News 1 01-17-2013 08:08 AM
changing include directories - /usr/local/include quep_fly Linux - Newbie 6 08-12-2007 04:36 PM
which headers usr/include/ or /usr/include/nptl/? Chris.Rector Linux - Enterprise 0 02-02-2007 01:40 PM
include/linux/types.h and include/linux/posix_types.h kpachopoulos Programming 2 11-26-2005 05:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News

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