Automating Linux Script


 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions Automating Linux Script
# 8  
Old 09-27-2013
Automation is about:
  • Make a function for everything
  • Minimize functions
  • Use functions/commands to an extend
  • Fetch the users thoughts/choice
  • Use of arguments
Or using abrevihations as everyone else:
KISS
Keep It Stupid & Simple

Or in other words, think what the user NEEDS, not what you think of.
Or give him lesser options, makes it easier to fetch available choices.

Example:
Code:
cd $HOME/KGS_HOME
mkdir -p Testing/{Beta,DLC,Indi}
mkdir -p Programming/{MainStory,SideStory,CharacterStats}
...
chmod 755 * -R

hth

EDIT:
Other than that, i (as well) have no idea what you talk about automation...
You list a bunch of folders, where is the automation in that?
What does your script do (other than creating folders)?

EDIT2:
Automation requires BRAIN v2.0 at least.
You (should) KNOW what you want to automate.... we cant help if we dont have enough data to evaluate from...

Last edited by sea; 09-27-2013 at 01:42 AM..
# 9  
Old 09-27-2013
All I know is that my instructor never covered automating in my course. The course consisted of teaching me what it took to make the code I provided. Next thing I know this assignment came up. The first part of my post states the exact text copied and pasted from my teachers assignment list. I cannot give any more information then I already have because I have only been using Linux for 5 weeks now and I understand barely 5% of this assignment. All I know is that I need to automate the process of creating directories and folders along with soft links and error messages for an imaginary company I have named KGS. I think it is meant to be used to insure that every company computer has the directories set up the same way.
# 10  
Old 09-27-2013
Quote:
Originally Posted by ekglag2
All I know is that my instructor never covered automating in my course. The course consisted of teaching me what it took to make the code I provided. Next thing I know this assignment came up.
You will have to ask your instructor what he means, then.
# 11  
Old 09-27-2013
I did ask him for more assistance, actually. Three times, to be exact. This first time he provided me with a link that brought me to a page that helped me understand automating slightly but didn't help me understand how to automate this assignment. After I realized that would not be enough for me to work with I contacted him again. This time he told me he already sent me a link and that if that wasn't enough for me then to research it on my own. I had been doing that previously and had by that point already created this thread as well. I then emailed him again stating that this was not enough help because I had called my student adviser for help, researched the topic, created this thread, and tried getting help from 4 of my peers, only one of whom would reply to me. That student was just as stuck as me. So here I am, having filed for an incomplete because I couldn't complete the assignment due to lack of understanding. I'm still trying to understand this automating stuff. I don't know how to set it up to check if the directories and files already exist or how to make error messages appear.

---------- Post updated at 01:31 PM ---------- Previous update was at 01:27 PM ----------

To make it more clear, my instructor told me to file for an incomplete if I couldn't finish my assignment by the due date and that he had done all he could for me and to work with what I have, which is nothing but a thread where no one understands my assignment any better then I do and an assignment that I can't complete. Is there any one who can try to break down automating each part of my script bit by bit? I can't seem to grasp this topic at all and I need some simple descriptions of how this is all supposed to work.
# 12  
Old 09-27-2013
"How to automate a script" depends on what needs to be automated in what way, the same way "how to write a script" depends on what you want to write to accomplish what end; so "automate" is as vague to us as it is to you. There isn't a secret hidden meaning we're intentionally hiding from you, and isn't a particular "automation" process to follow.

I'm guessing (but only guessing) that he wants you filling in things with variables from commandline parameters, instead of using hardcoded names. Template for what, to do what, in what way, remains a mystery.

Her might also mean feeding things into a script's stdin to fill out answers automatically. Or might not.
# 13  
Old 09-27-2013
You can run your script on another computer by means of the ssh command ...
# 14  
Old 09-27-2013
Now there's an answer that helps a lot. Thank you! This whole time I thought automating was something specific. That explains a lot for me. Is it possible to save script and run it elsewhere? How would I go about making my code an executable file, if that is even possible?

---------- Post updated at 02:03 PM ---------- Previous update was at 02:02 PM ----------

Quote:
Originally Posted by MadeInGermany
You can run your script on another computer by means of the ssh command ...
How would I go about using that command?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Automating Linux Script

I want to automate the creation or processing of the following: Directory and subdirectory creation for your scenario company Files in each of the directories Symbolic links from 2 subdirectories to their parent directories Setting appropriate file permissions for the directories and... (1 Reply)
Discussion started by: ekglag2
1 Replies

2. Shell Programming and Scripting

Automating Crontab through script??

is it possible to automate crontab through script... I ll be getting the data i.e. cron entries from DB. (5 Replies)
Discussion started by: nikhil jain
5 Replies

3. Shell Programming and Scripting

automating a perl script

Hi, I have a perl script that takes in 2 numerical values as ARGV. perl script.pl parameter1 num1 num2 in my case I have 1000's of num1 and num2. I can have them in separate files. Please let me know how to automate this run using shell scripting or using awk, so that I don't have to... (4 Replies)
Discussion started by: Lucky Ali
4 Replies

4. Shell Programming and Scripting

Help with automating a bash script

Hi Guys, There are some emails going deferred as we got some new IP's from our ISP. So I was trying to manually copy the deferred mail and forward it to our sales team so that they can contact our client. I am new to this script thing, but luckily I was able to write the code to extract the data... (1 Reply)
Discussion started by: linuxrulz
1 Replies

5. Shell Programming and Scripting

Automating A Perl Script over a database

Dear Scripting Gods I've never done shell scripting before and have only recently got to grips with Perl, so apologies for my naivity. I've written a perl program which takes in two files as arguments (these are text documents which take in the information I need) The perl program spits out a... (1 Reply)
Discussion started by: fraizerangus
1 Replies

6. Shell Programming and Scripting

Automating Interactive script

I have a script that will install software on all remote host. At the end of the script it starts the install.sh part and goes into a interactive mode asking Yes or No questions and prompting to add a username and password. My question is how can I script this so that these questions are... (7 Replies)
Discussion started by: soupbone38
7 Replies

7. Shell Programming and Scripting

Help in automating dates in ksh script

I need to run a command at the end of a backup job and this command will produce a report of what my backup jobs have collected in the previous day. The real problem is that this binary works with absolute dates only, so I should have to modify the script every single time I need it to work. It... (1 Reply)
Discussion started by: italia1971luca
1 Replies

8. UNIX for Dummies Questions & Answers

cron ? automating a script

Hi all. basically i need to run a script every 30 minutes. my script is simply an error report: errpt thats it, is there anyway to make this happen every 30 minutes without having to type errpt in, the script will get bigger as i add more things to do but just need to know how to... (8 Replies)
Discussion started by: hassanj
8 Replies

9. Shell Programming and Scripting

Automating Logform Command in a script

Hi all I am trying to create a script to automate the creating of filesystems. The problem I am having is as follows:- After creating the Log Logical Volume, I want to format it, using the logform command. The Logform command expects user intervention, by typing 'y' and 'enter' to continue.... (2 Replies)
Discussion started by: TheDoc
2 Replies

10. Shell Programming and Scripting

automating sftp script

I have to write an automated sftp script which uses password authentication method to access the remote server. I want to pass the password as a parameter or to be included in the script itself, so that when i run the sftp script, it should not prompt me to enter the password. Thanks in advance... (1 Reply)
Discussion started by: Rajeshsu
1 Replies
Login or Register to Ask a Question