Results 1 to 2 of 2
Dear all,
I am new to linux & much eager to learn scripts.
My initial task is to write scripts to access the installed software i.e. in subfolder menu.license.dat file ...
- 07-15-2007 #1Just Joined!
- Join Date
- Jul 2007
- Posts
- 3
bash scripts to access installed software
Dear all,
I am new to linux & much eager to learn scripts.
My initial task is to write scripts to access the installed software i.e. in subfolder menu.license.dat file is to be initialised.
folder path is root/homw/sw/starcd/.....keep goes on around 8 folders
how to write scripts and how to initlize the license file
Apart this i have written some simple scripts & i have run it. It works well
in the script file folder i.e all i have written in root~directory & if suppose
i am in root /folder it doesnt work? to this how to set Path?
Also i need suggestion to well write scripts which language is most suitable
Python,or C++,or C i am engineering backround (mechanical eng) also i need to write some enggineering tasks by using the above language.
Thanks
Prakash
- 07-16-2007 #2
First off, a warm welcome to the forums!
As you say you are new to Linux and I couldn't make the following out from your post, let me start with a warning: Please don't treat /root as a working directory.
On a new Linux box you'll find yourself logged in as root. But do this out of necessity, not out of habit.
----
Now to answer your questions:
I'm not exactly sure what you're trying to accomplish. Do you want a script that reads predetermined txt files?
Originally Posted by Analisys
or run a predetermined file?Code:cat /path/file | less
Adding variables, menu's, a search'n'run function, what have you? All doable, but I'm not really sure about your intent.Code:/path/file
Please don't! By the way, when you are root, /root is in your path. But when you are $USER, /root isn't.
Originally Posted by Analisys
You can run your script from any directory by /path/script
You can run a script in your current directory by ./script
The shell doesn't look in your current directory for executables, this is for security reasons. if your current directory happens to be in your path, then it'll run your script. Otherwise it wont. You can easily run scripts as user when they are in your home directory.
Highly depends on your needs. If you want to learn scripting and eager to learn Gnu/Linux... don't overlook the obvious. Put some effort in learning basic bash scripting. You'll never regret learning that, as most of your important system scripts are in that language: rc.* rc.cups inittab etc, etc
Originally Posted by Analisys
Besides, it's easy, flexible and powerful in it's own right. Other languages may have greater strengths in specialized areas, but bash is your default all-purpose language that makes your life easier, more pleasant and it'll teach you a great deal about your system.Can't tell an OS by it's GUI


Reply With Quote