Sponsored Content
Full Discussion: question on shell script
Top Forums Programming question on shell script Post 302505844 by Corona688 on Thursday 17th of March 2011 07:46:50 PM
Old 03-17-2011
Quote:
Originally Posted by omega666
what do u mean if i am root, and why is it bad to do this?
It's insecure. You'd have no control over which directories you'd run programs from. Something could dump a suspicious program named 'ls' in your home directory and have you run it by accident. This is especially bad for root for obvious reasons.
Quote:
and is there a way that instead of using that command, i can edit my_prog and still achieve this?
That's not how it works. The shell script doesn't control whether you're allowed to run it or not. Your shell uses your PATH to determine where programs come from and that's it.

Put it in a directory in your $PATH and then your shell will be able to find it.

Traditionally custom commands get put in /usr/local/bin/. Put your script in there, and edit your PATH to contain /usr/local/bin/.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell script question

I am using ksh. There is a report having amounts in the following format, 34343.67- 2343.45 23434.89- I want to sum up all the amounts. For this I first need to find out if there is a minus sign at the end and prefix it before summing up. How to achieve this? I thought of using an... (2 Replies)
Discussion started by: tselvanin
2 Replies

2. UNIX for Dummies Questions & Answers

Linux Shell Question: how to print the shell script name ?

Suppose I have a script named "sc.sh" in the script how to print out its name "sc.sh"? (3 Replies)
Discussion started by: meili100
3 Replies

3. Shell Programming and Scripting

Shell Script question

Hello Experts, I am new at this and need some help. I am looking for a delete command that allows me after I grep for the hostname to delete all the lines between two characters. for example I want to delete the first line all the way up to the } character host test019 { hardware ethernet... (10 Replies)
Discussion started by: ryanique
10 Replies

4. Shell Programming and Scripting

shell script question

Hi, The contents of my file is below: Name,Location,Degree,Gender,Awards Robert,Philadelphia,Accounting,Male,5 Jane,Chicago,Business,Female,2 Allan,New York,Engineering,Male,6 Tom,Detroit,Computer Science,Male,10 Nancy,Milwaukee,Engineering,Female,4 I want to add a "ID" in the 1st line... (2 Replies)
Discussion started by: xinoo
2 Replies

5. Shell Programming and Scripting

shell script question

I have script as following.. server_status= some command | grep "Total error: 0" if ; then echo " Server $(hostname) is Down" >>Result fi else echo " Server is OK on $(hostname)" >>Result the if command seems to be not working properly for some... (13 Replies)
Discussion started by: s_linux
13 Replies

6. Homework & Coursework Questions

Question on shell script

Hiiiiiiiiiiiii all, Please i want your help fast, the teacher gave us this assignment can u help me to write it? this is the question: Write a shell script to point all prime numbers from the fibonacci series of integer N? using Red hat Os Thanks all and waiting for ur answers... (1 Reply)
Discussion started by: moonlips
1 Replies

7. Homework & Coursework Questions

question on shell script

hiiiiiiiiiiiii,,I found an error on my following script but couldnt find it!!! Can you please help me as soon as possible?! echo "enter a number " read n i=0 first=0 second=1 result=0 prime="true" echo –n " $first $second " while do result=`expr $first + $second` first=$second... (10 Replies)
Discussion started by: moonlips
10 Replies

8. Homework & Coursework Questions

question in shell script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a Bourne shell script which: • Has one command line argument. • If the command line argument is a... (5 Replies)
Discussion started by: abood1190
5 Replies

9. Shell Programming and Scripting

Shell script question

Hi all, can you plz check whether the below code is correct & some inputs. I need to read the below file and process it. input : /home/ibm/var.txt urgent not urgent not needed. #!/usr/bin/ksh VAR=/home/ibm/var.txt if ] then (7 Replies)
Discussion started by: ramkumar15
7 Replies

10. Shell Programming and Scripting

Shell script question

As per code it is getting matched. not sure why it assigning to cols=0. Any inputs please. Input : passed is shell.sh c tablename. if ; then cols=1 table=$2 else cols=0 table=$1 fi (1 Reply)
Discussion started by: ramkumar15
1 Replies
GTKADA-CONFIG(1)					     GtkAda programming manual						  GTKADA-CONFIG(1)

NAME
gtkada-config - script to get information about the installed version of GTKADA SYNOPSIS
gtkada-config [--prefix[=DIR]] [--version] [--libs] [--cflags] [--static] DESCRIPTION
gtkada-config is a tool that is used to configure to determine the compiler and linker flags that should be used to compile and link pro- grams that use GtkAda. To compile, bind and link a program against GtkAda, you invoke gnatmake like this: gnatmake my_prog `gtkada-config` OPTIONS
gtkada-config accepts the following options: --version Print the currently installed version of GTKADA on the standard output. --libs Print the linker flags that are necessary to link a GTKADA program. --cflags Print the compiler flags that are necessary to compile a GTKADA program. --static Print the flags that are necessary to statically build a GTKADA program. --prefix Print the path prefix where GTKADA is installed. NOTES
In Debian GNU/Linux, a GNAT project file is available as an alternative; see /usr/share/ada/adainclude/gtkada.gpr. COPYRIGHT FOR THIS MAN PAGE
This man page has been written by Samuel Tardieu and modified by Ludovic Brenta and Nicolas Boulenguez for the Debian GNU/Linux distribu- tion, from information given by the GtkAda authors Emmanuel Briot, Joel Brobecker and Arnaud Charlet. Permission to use, copy, modify, and distribute this documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documenta- tion. Debian GNU/Linux 16 October 2011 GTKADA-CONFIG(1)
All times are GMT -4. The time now is 08:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy