Learning Scripting
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
Learning Scripting
What would be the Linux Mint equivalent of something like Windows Powershell? I'd like to start getting my hands dirty with scripting on something other than Windows.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Learning Scripting
The default shell on Linux Mint is bash. You can install other shells and you can use other scripting languages. Here is a good guide on the Linux command line and scripting: http://en.flossmanuals.net/command-line/. This explains how to access builtin help and documentation for commands as well. Once you've made your way through that go on to http://mywiki.wooledge.org/BashGuide and http://mywiki.wooledge.org/BashFAQ.
Re: Learning Scripting
Once upon a time, I had a linux class in college (Red Had 9). Most of the basics have stuck around, but some of the more obscure stuff is long since gone. Those should be a good help. Thanks for the pointers!
Do you happen to know if there are any sites where people request scripts and coding for certain things? Sometimes I have trouble finding a place to start while staring at my computer.
Do you happen to know if there are any sites where people request scripts and coding for certain things? Sometimes I have trouble finding a place to start while staring at my computer.
Re: Learning Scripting
How to write a Bash shell script - by example
is an excellent resource, but I'm partial.
We could throw 100s of links at you and it's be pointless.
What do you want to do in the shell?
is an excellent resource, but I'm partial.
We could throw 100s of links at you and it's be pointless.
What do you want to do in the shell?
Re: Learning Scripting
Haha, I got ya. Thanks for the input.Habitual wrote:How to write a Bash shell script - by example
is an excellent resource, but I'm partial.
I know it's an irrationally broad request, and for that I apologize. What do I want to do? I have no idea. Well, let's say, at work I'm working on a powershell script to dump all user's permissions to any given folder (recursive directory tree) based on all group memberships, even nested, to an access db. Eventually I'm going to convert it to a SQL DB.We could throw 100s of links at you and it's be pointless.
What do you want to do in the shell?
I don't have any reason to do that on my personal device, but I guess building something similar in bash might be a decent direction to start and a good learning exercise. Really, I'm at the point where I don't even know where to start (learning by doing, is a curse of mine, I suppose), hence the thread.
What's a typical system admin task a lot of people script? Automate a daily scan of event logs for disk errors? That's probably more realistic place to start.
Re: Learning Scripting
Here's an easy one. Are there any decent scripting environment applications available (I guess they're generally called IDEs?) that allow running a script selection for testing purposes, syntax highlighting, variable tracking and such?
Re: Learning Scripting
Apology not accepted.lightwing wrote:I know it's an irrationally broad request, and for that I apologize. What do I want to do? I have no idea. Well, let's say, at work I'm working on a powershell script to dump all user's permissions to any given folder (recursive directory tree) based on all group memberships, even nested, to an access db. Eventually I'm going to convert it to a SQL DB.
I don't have any reason to do that on my personal device, but I guess building something similar in bash might be a decent direction to start and a good learning exercise. Really, I'm at the point where I don't even know where to start (learning by doing, is a curse of mine, I suppose), hence the thread.
What's a typical system admin task a lot of people script? Automate a daily scan of event logs for disk errors? That's probably more realistic place to start.
One Linux utility for "get all users perms" is getfacl
I have a Mantra (A-oooooooooooooooooom).
If I have to type it more than 3 times in 1 day, It becomes a script.
My College DOS professor gave me that advice.
True in DOS. True+ in Linux.
Linux is just DOS on steroids.
What do you find youself repeatedly "doing" in the shell that caused you to get started?
Here's a process-driven task you need to master.
Automate backups of your personal data.
Have enough storage to learn that?
Write the script. Debug, Once it runs on it's own.
We'll automated the process via cron.
If you are "looking for errors" on a Linux machine, you could be here awhile.
Have one specific in mind?
Last edited by Habitual on Sat Aug 20, 2016 8:45 am, edited 1 time in total.
Re: Learning Scripting
Tough crowd.Habitual wrote: Apology not accepted.
If i'm understanding the getfacl man page and --help correctly, that's not exactly it, but it's cool. Look up Hyena AD Group Management or Dumpsec...something like that, only much simpler. Windows is my day job....Linux is for fun.One Linux utility for "get all users perms" is getfacl
Nothing specific in mind yet. All good pointers. I appreciate the info. I need to spend some more time with this to figure out what kinds of things I want to automate for myself. Guess I'll hang out and see what kinds of things other people are asking about. That might help too.I have a Mantra (A-oooooooooooooooooom).
If I have to type it more than 3 times in 1 day, It becomes a script.
My College DOS professor gave me that advice.
True is DOS, true+ in Linux.
Linux is just DOS on steroids.
What do you find youself repeatedly "doing" in the shell that caused you to get started?
Here's a process-driven task you need to master.
Automate backups of your personal data.
Have enough storage to learn that?
Write the script. Debug, Once it runs on it's own.
We'll automated the process via cron.
If you are "looking for errors" on a Linux machine, you could be here awhile.
Have one specific in mind?
Re: Learning Scripting
Get all user perms from where, Linux or Windows?
You want to poll/collect/inspect Windows perms from your Linux host?
You want to poll/collect/inspect Windows perms from your Linux host?
Re: Learning Scripting
No, nevermind. I'm probably giving too much info and causing confusion.Habitual wrote:You want to poll/collect/inspect Windows perms from your Linux host?
Re: Learning Scripting
Python is #1 for scripting IMO.lightwing wrote:What would be the Linux Mint equivalent of something like Windows Powershell? I'd like to start getting my hands dirty with scripting on something other than Windows.