LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-30-2021, 07:05 AM   #1
Racho
LQ Newbie
 
Registered: Oct 2021
Posts: 16

Rep: Reputation: Disabled
How to share a bash script?


Hi there

I've made a bash script that adds several .csv files into a .ods spreadsheet.

Sometimes i code just for fun, I'm not a software developer and I never get my code reviewed by anyone.

Now I would like to share this script hoping that someone can find it useful and to get the chance to learn something from other people's commnents about it.

Where should I post it?
 
Old 10-30-2021, 07:16 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,037

Rep: Reputation: Disabled
GitHub?
 
1 members found this post helpful.
Old 10-30-2021, 07:18 AM   #3
jmgibson1981
Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Ubuntu
Posts: 738

Rep: Reputation: 229Reputation: 229Reputation: 229
I'm not sure there is a place for that really. One thing I do is when I see a thread on the topic I will sometimes link my script from my gitlab. I also will occasionally direct post functions from my scripts sometimes if they contain something I think will help someone on a given topic.
 
Old 10-30-2021, 08:04 AM   #4
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 1,782

Rep: Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456

Before you share it anywhere, check with with ShellCheck to identify any obvious issues.

For sharing/reviews, if you don't want to self-host there are a number of online code repositories where projects can be hosted.

GitHub is the most popular, but many people dislike that it is proprietary and now owned and run by Microsoft, and there are plenty of other options - Wikipedia has a comparison: https://en.wikipedia.org/wiki/Comparison_of_source-code-hosting_facilities

If you don't think the script merits a project of its own, you can simply create a project "Racho's Scripts" (or whatever) and add scripts as and when you feel like it.
(But either way, to share the code with others you should make sure you clearly indicate a license - see https://choosealicense.com/licenses/ for options.)


Last edited by boughtonp; 10-30-2021 at 08:05 AM.
 
4 members found this post helpful.
Old 10-30-2021, 10:32 AM   #5
Racho
LQ Newbie
 
Registered: Oct 2021
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanks boughtonp

Shell check got some issues and I will work on them before posting

to choose a license is enough to write it at the beginning or I have to do something else?

I will take a look at those repositories.

Thanks!
 
Old 10-30-2021, 12:04 PM   #6
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 1,782

Rep: Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456

If you have a readme file stating what the license is, plus a license file containing the wording, that would probably be clear enough for most people.

If you're including code written by others, you'd need to identify that in some obvious way (e.g. in a credits/licensing section of the readme).

For extra clarity, I tend to include a single-line header with each non-trivial file I've written, e.g : "# <project name+version> | (c) <my name> | License: <license> | Website: <url>"

(The FSF/GPL recommend using several paragraphs of text at the start of every file for that purpose, so that's something you'll see quite often. I consider that overly-verbose bloat.)

For Bash scripts, the "#!/bin/bash" line needs to be at the front, so the above would go on the second line.

(Disclaimer: I'm not a lawyer; this post is my opinion and not legal advice.)

 
Old 10-30-2021, 12:16 PM   #7
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 10,188

Rep: Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752
Our Member Success Stories forum! If the script is long, put it on gist.github.com and post the link there.
 
Old 10-31-2021, 03:31 AM   #8
Racho
LQ Newbie
 
Registered: Oct 2021
Posts: 16

Original Poster
Rep: Reputation: Disabled
Hi dugan

I posted in sourceforge.

This is the link

https://sourceforge.net/projects/addcsv2ods/

My problem now is that don't know how to do anything there and there are a lot options so I'm a bit lost there.

I chose sourceforge because at first glance seemed easier than github to me.

Last edited by Racho; 10-31-2021 at 03:36 AM.
 
Old 10-31-2021, 03:52 AM   #9
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 5,971
Blog Entries: 3

Rep: Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102
GitHub is proprietary and owned by M$, there's a lot of problems with that both technical, economic, and political. Further there have been several exoduses since it was acquired by M$ so it is far from the best choice.

SourceForge was the go-to service for many years, but I have lost track of who owns it and why it is so much less popular than before. It has been many years since I've used it, but if I understand correctly you have your choice of version control systems. The main one in the old days was CVS. Then there were several competing choices for a while and when the dust settled, Git seems to have come out on top. Git has nothing to do with GitHub, despite the name. Anyway, if I recall correctly you can either upload to SourceForge using SFTP or Rsync or else check in your work using Git. Using Git is the more useful approach in the long term if you are interested in programming as it is needed for collaboration.

So try starting here, starting with creating a new project:
https://sourceforge.net/p/forge/docu...n/Docs%20Home/

source hut is also a reasonable choice, as is self-hosting.
 
2 members found this post helpful.
Old 10-31-2021, 04:15 AM   #10
Racho
LQ Newbie
 
Registered: Oct 2021
Posts: 16

Original Poster
Rep: Reputation: Disabled
Hi Turbocapitalist

I uploaded the file via web, it was just the easiest way.

Version control systems was not really a choice. I just had to choose one option and all them were new to me, so I just took one without really knowing what was I doing ... I suppose this is something I can change whenever i want, i just have to figure it out how.

Quote:
So try starting here, starting with creating a new project:
https://sourceforge.net/p/forge/docu...n/Docs%20Home/
Thanks I will read it!
I was needing a tutorial to use that web properly.
I may end up hosting the script in git, but first I need to get more familiar with all that environment that is new to me. This can take me some time though because I make this in my spare time.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Running bash script from another bash script bulletproof.rs Programming 5 12-10-2017 05:22 AM
[SOLVED] BASH Script - What am I doing wrong in this test? - BASH Script BW-userx Programming 34 04-08-2017 02:36 PM
LXer: Share And Discover Cool Bash Tricks With Bash One-Liners LXer Syndicated Linux News 0 01-30-2012 10:50 AM
SSH connection from BASH script stops further BASH script commands tardis1 Linux - Newbie 3 12-06-2010 09:56 AM
Bash script to create bash script jag7720 Programming 10 09-10-2007 08:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:09 AM.

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