The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 20, 2019, 11:01:04 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: bash get organized  (Read 3373 times)
serialnoob
Journeyman
***
Offline Offline

Posts: 88


View Profile
« on: July 20, 2010, 06:47:38 AM »

I am getting into bash scripting for all reasons that now seem obvious to me and have been to most of you.

As a serial noob, I cannot figure out what type of file organization I should set ie where to logically store script_n.sh

/home/serianoob/bin/script_n.sh...?
/home/serianoob/my_new_app/script_n.sh...?
/var/dir/bla/bla/...?

how do you guys do it?
« Last Edit: July 20, 2010, 07:02:26 AM by serialnoob » Logged

Success consists of going from failure to failure without loss of enthusiasm - Winston Churchill
serialnoob
Journeyman
***
Offline Offline

Posts: 88


View Profile
« Reply #1 on: July 20, 2010, 10:09:36 AM »

wrong formulation I suppose  Need Help
Logged

Success consists of going from failure to failure without loss of enthusiasm - Winston Churchill
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #2 on: July 21, 2010, 12:47:28 PM »

Depends on the type of script for me.

For system wide scripts, or scripts that affect system services, like apstart, apstop, apcycle, my start, mystop, ftpstart, ftpstop I put them in /usr/local/sbin or bin. Dunno if this is right or wrong, just what I do. If a script is part of an application, like a website, then it's more than likely right with the other components of that system, like /www/sites/sitename/utilities.

I don't treat scripts so differently that they all must be in a particular place.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
serialnoob
Journeyman
***
Offline Offline

Posts: 88


View Profile
« Reply #3 on: July 21, 2010, 05:28:21 PM »

Hey, the Gov himself! so very kind,

Dunno if this is right or wrong, just what I do.

So I guess this says it all since it works! Got the point, thanks Perk.

Logged

Success consists of going from failure to failure without loss of enthusiasm - Winston Churchill
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #4 on: July 21, 2010, 08:13:43 PM »

No worries SN. It's about the best I can do from this cruise ship. Slow damn net, but great responding from the deck chair.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
serialnoob
Journeyman
***
Offline Offline

Posts: 88


View Profile
« Reply #5 on: July 22, 2010, 04:51:39 AM »

Then again, a rather appropriate time to cruise and JD or Mojito!

More generally though, I am starting to get there as far as codes are concerned, but I have absolutely no clue on how the resulting 0s and 1s (if this is still the case?) get the whole thing to work, hence, the initial question.

So I will have spent most of this part of my life wondering whether a particular folder/file structure is likely to affect performance. Not that I really believe that my code is so smart that the only improvement would be in this area, but
your answer suggests a no again right?
Logged

Success consists of going from failure to failure without loss of enthusiasm - Winston Churchill
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #6 on: July 22, 2010, 05:02:55 AM »

Unless you have stupidly large and deep file structures, and even then, you most like will never see a performance hit based on where a script is. Just doesn't work that way.

Location in a file system is almost exclusively for organizational purposes.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
serialnoob
Journeyman
***
Offline Offline

Posts: 88


View Profile
« Reply #7 on: July 22, 2010, 05:48:21 AM »

Thanks and good cruise!
Logged

Success consists of going from failure to failure without loss of enthusiasm - Winston Churchill
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!