Skip to content

updated functionality and modified bashreadline script/txt #5224

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

skipmcgee
Copy link

I have worked through the contributing scripts file and I think this pr meets all desired criteria. I tknow this script hasn't been contributed to in a long time, but I think these mods would help a user of this tool.

This pr adds the following functionality to the bashreadline script and includes appropriate updates in the example.txt:

  1. Date updated from time to datetime
  2. Adds UID of command which seems essential to script relevance
  3. Adds json output for additional tool compatibility
  4. Adds logging to a file output as an argument

@skipmcgee
Copy link
Author

@yonghong-song i looked through these tests but I don’t see much related to my PR - is there any action you want from me?

@yonghong-song
Copy link
Collaborator

Tests are not related to your patch. I yet got time to investigate test failure. But will do it soon.

@yonghong-song
Copy link
Collaborator

You didn't really provide strong use case for new features. For example, for UID, I don't know how it will useful for people just want to trace bashreadline thing. They can search pid in 'ps' to find all additional information is needed and I suspect the current output should be sufficient in most cases. There is no need to json output as well as the output from the script is likely the one user will check.

Again, please provide strong reason to add new options.

@skipmcgee
Copy link
Author

Thanks, that is a great point. Let me provide my intentions and use-cases. These are really just a couple of simple items that I think any user would prefer to have available as they make using the script more beneficial / easier.

  1. Time changed to date+time: this helps a script user better correlate the events displayed by the script - for example if you output to a file it helps a user correlate the output to the appropriate day and time.
  2. Added UID:
    a) this proves that the script does in fact accomplish its stated goal to monitor the commands input by all bash shells
    b) enables a user of the script to easily track those commands to multiple or individual users (without an extra call like ps)
  3. Added JSON output:
    a) this enables a user to display the output more nicely via a utility like jq
    b) this enables the script output to be more easily consumed by other tools
  4. file output: this is nice to have if you want to collect data from this script for a period of time. A user could always redirect the output, but a built-in file output option makes the script more user-friendly

@skipmcgee
Copy link
Author

@yonghong-song just wanted to follow up here if you have time to review my comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants