Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Linux Shell Scripting

I heard that you can use VBscript or create a Batch file on any Windows Operating System,

So what script can you use on any Linux Dist? What would linux have that would rival Window's Batch file?

thankz . . . :D
Your general Bash shell will not only rival Windows, but will far surpass it in every possible category.
W0w, what a fast reply . . . is that what you call it? Bash shell? . . . Then do you know any ebook that will introduce me and take me in depth into it . . . well a video tutorial would be much better . . . hahaha :D
Use Google. There are tons of guides, articles, tutorials, and primers on using Bash. It would certainly help to have a Linux environment available t practice in.
There sure are tons of guides i can find using Google, what I was asking though is the best one among them , , , hahaha , , , Well, i was just trying to hear your suggestion on which one you think is better, based on your experience perhaps? . . . hehehe, We'll i'm trying to use Ubuntu 10.10 since it is the most stable Linux dist that I've heard of . . . :D

Thanks anyway. . .
Here's a few resources that should get you on your way.

If you want to learn more about linux in general, I suggest learning from the Archlinux wiki. It is the best wiki for any linux distro, hands down. And even though you may use Ubuntu now, the skills are directly transferabe(except stuff like editing rc.conf)

I use Ubuntu on this asus 1101ha only because of this retarted gma 500 driver...doesn't work half as nice on Arch..anyway on to Bash.

http://www.bashscripts.info
is a great resource and this dude has some great vids on youtube, i highly recommend his stuff

If you can, get your hands on a copy of CBTNuggets Scripting videos. They are about 4ish years old now, but a great intro to bash, python and perl.

http://wiki.bash-hackers.org/scripting/tutoriallist
here is a bunch of links to some great sites on scripting.

As far as ebooks are concerned, I recommend
Apress.Pro.Bash.Programming.Scripting.the.GNU.Linux.Shell
Linux Shell Scripting with Bash
John.Wiley.And.Sons.Mastering.Unix.Shell.Scripting
Bash Cookbook

These can all be found with the help of Big G ;)

One last thing, I have used a few different editors of the years and have settled on gedit with a few plugins enabled, but for quick editing you can't beat nano with syntax highlighting. Others use Vim, it all comes down to personal prefference.

Hope this helps you a bit. Pm me if you need any help and good luck.
Thank you for the information usersix . . . :D
Nice information usersix!

Very helpful!
haha when I tried to register on Archlinux's forums, it asks me for the output of a certain code.
I'm guessing its a code for bash scripting . . . hahahaha
Here's the code or script:
"date -u +%W$(uname)|sha256sum|sed's/\W\\g'"?
:D
Can anyone decode this for me? hahahaha
Just run that command in a terminal dude.
so it really is a bash shell script?
Did i guess it right? . . . hehehe
This bit of code is not a bash script
date -u +%W$(uname)|sha256sum|sed's/\W\\g'"?

It is just a few commands piped together.
Piping is a few commands run one after the other, more precisely the output of command 1 piped into command 2 and so on..
There is no limit to how much piping you can do. But it is limited by command 1 must output something and command 2 must be able to accept input.
It breaks down like this:
date -u +%W$(uname) | sha256sum | sed's/\W\\g'"?
show the date with the UTC timezone + the machine name

date -u +%W$(uname) | sha256sum | sed's/\W\\g'"?
this checks the sha checksum, like an md5 but different algorithm
(basically verifying a file for corruption or malicious stuff)

date -u +%W$(uname) | sha256sum | sed's/\W\\g'"?
sed is a little program that cuts text by different arguments.
Off the top of my head I can't remember sed's options, but a simple google search enclosed in "" double quotes will help you out. Or just type "man sed" in bash

If you really want to get profficent at the cli, learn the basics of SED, AWK and GREP. It will make your scripting life much easier.
Sorry for the long post, but I think I explained things clearly.

I should add, to pipe command 1 into command 2 use the shift backslash (above the enter key on us-based keyboards)
(Apr 18, 2011 03:50 PM)marzzz21 Wrote:  haha when I tried to register on Archlinux's forums, it asks me for the output of a certain code.
I'm guessing its a code for bash scripting . . . hahahaha
Here's the code or script:
"date -u +%W$(uname)|sha256sum|sed's/\W\\g'"?
:D
Can anyone decode this for me? hahahaha

Stop saying hahaha after each sentence.

That's the same as putting in a command into Window's CMD and it executing some function.

If you want a WRITTEN out script alright, go in any editor, type all the shit you want it to do, then save it has name.sh.

When you want to execute it, cd to the path of the shell script and type:

./name.sh
Ok, I'll try that one . . . :D . . . Is it just me or is it really quite hard to register for the Archlinux forums? hehehe
I think it's only me who is having a hard time huh? . . . hahahaha :D
thankz Batman and usersix . . . :D
(Apr 19, 2011 11:45 AM)Chebyshev Wrote:  Stop saying hahaha after each sentence.

That's the same as putting in a command into Window's CMD and it executing some function.

If you want a WRITTEN out script alright, go in any editor, type all the shit you want it to do, then save it has name.sh.

When you want to execute it, cd to the path of the shell script and type:

./name.sh
You forgot that you have to chmod +x it,and the .sh extension is not needed,the shebang line is the important one.

And @marzzz21 ,stop saying hahaha and :D after each sentence ,it makes you look like a retard.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by ReplaceNov 29, 2025 01:04 AM 12 279 Nov 29, 2025 01:04 AM
Last Post: TheGoodDr
by SIM-5610537Jan 18, 2025 05:19 PM 5 316 Jan 18, 2025 05:19 PM
Last Post: SIM-5610537
by yungchristMay 12, 2017 08:21 PM 3 268 May 12, 2017 08:21 PM
Last Post: g4143