The Wayback Machine - https://web.archive.org/web/20210119014403/https://github.com/dylanaraps/pure-bash-bible/issues/2
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO #2

Open
dylanaraps opened this issue Jun 14, 2018 · 8 comments
Open

TODO #2

dylanaraps opened this issue Jun 14, 2018 · 8 comments

Comments

@dylanaraps
Copy link
Owner

@dylanaraps dylanaraps commented Jun 14, 2018

  • Dynamic variable naming.
  • Internal variables.
  • Turn the non-functions into functions.
    • This is so tests can be written.
    • It also shows a working use case for the task.
  • Add a CONTRIBUTING.md.
  • Look into side effects of using shopt and set.
  • /dev/tcp
  • Convert to pdf
    • Add a cover.
    • Add references.
  • Write some in-depth descriptions for all of the functions.
    • How they work.
    • What tools they replace.
    • Caveats
    • ???
  • Add argument parsing.
@zutto
Copy link

@zutto zutto commented Jun 21, 2018

if I may add to your to-do list, mathematical operations would be cool addition.
EDIT 21/6/2018:
I did a bit of a research, apparently bash's math is limited to what was already written in the bible 😞, maybe I missed something?

Also sidenote, I love this bible 👍

@dylanaraps
Copy link
Owner Author

@dylanaraps dylanaraps commented Jun 21, 2018

Will do, cheers!

@dylanaraps
Copy link
Owner Author

@dylanaraps dylanaraps commented Jun 21, 2018

There's all of the arithmetic operators: http://tldp.org/LDP/abs/html/ops.html (which is what I thought you meant).

@gilles13
Copy link

@gilles13 gilles13 commented Jun 21, 2018

maybe set operations ?
by the way 👍 really good job !

@dylanaraps
Copy link
Owner Author

@dylanaraps dylanaraps commented Jun 21, 2018

Does bash have set operations? Edit: I see what you mean now. I don't think this is possible in pure bash but I'll work on it.

Repository owner deleted a comment Jun 26, 2018
pludi added a commit to pludi/pure-bash-bible that referenced this issue Aug 9, 2018
Added GNU Make file to build PDFs (Letter & A4) and ePub (for e-readers)
through pandoc & XeLaTeX.

ToDo:
-   Title page, including Image
-   List of all contributors for Authors-List

See dylanaraps#2
@kalexmills
Copy link

@kalexmills kalexmills commented Aug 10, 2018

Might be nice to see some pure-bash / POSIX process-management examples (since bash is usually used as a scripting language to manage processes).

  1. How to start a process while grabbing and saving its PID.
  2. Wait for a process to finish and conditionally execute based on return code.
  3. Do something when a process returns something other than zero.
  4. Kill a process based on its PID and don't continue until it is dead.

EDIT: If one of the trap operations already covers this, some examples would be nice.

EDIT 2: This link may be a good resource if someone wants to add a few formatted examples here.

@php1ic
Copy link

@php1ic php1ic commented Aug 28, 2018

Could you add a section discussing the usage of printf vs echo.

Is there a significant performance difference between the 2, or as the project is using BASH, and only BASH, is it just personal preference? Both are used in the README.md without mention of why there has been a switch.

@stickydrive
Copy link

@stickydrive stickydrive commented Oct 2, 2019

Hey

Might be nice to have exit code section with the meaning of those codes and how you can tweak them in order to concat more then one script based on prev exit code

I.E
script 1 ended with exit code 0 , go to next script 2 OR print error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.