05-18-2006
More info
Sorry, the question was asked to me, "What is the danger associated with not adding " ./ " before a
> >script name when you run it?"
I pretty much know what it means I just don't know what would happen if I don't add it to a command.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi, I have just started a Systems Programming course and am required to write a c shell script as part of it.
I have little to no clue about unix.
The spec states that the script can be run only once on each host by a user, but the script can be run on different hosts by the one user.
... (2 Replies)
Discussion started by: richgi
2 Replies
2. Shell Programming and Scripting
Hello,
I don't know anything about scripting, and I want help on writing a script, which can help me doing my research.
Actually I have some ASCII format files formatted in a way looks like this
6 lines of text that is not important for me
File_header_name_number_1 <--... (1 Reply)
Discussion started by: geoquest
1 Replies
3. Shell Programming and Scripting
I am very new to Unix. I need to write a script that will grep some files, etc. When I write the script, do I need to know what shell I am using? If so, how do I do that? (1 Reply)
Discussion started by: ssmiths001
1 Replies
4. Shell Programming and Scripting
I am currently taking a linux shell scripting class and also a intro to programming class using QBASIC. Will this interfere with how i learn each one? Are they similar in some ways? I already took a unix course based on the commands and it was easy, but now i have to create programs. Also, how... (1 Reply)
Discussion started by: brentdeback
1 Replies
5. AIX
Please help me
1. Please give me the few examples of shell scripts written for AIX
2.I have scripts written on Unix, does that work for AIX, if not what are the changes to be carried out to run the scripts on AIX....
Please help me (4 Replies)
Discussion started by: me_haroon
4 Replies
6. Shell Programming and Scripting
can anyone help me in writing a shell script to visualize how simple commands work and on what logic. For Eg: ls command how it lists out all the files and directories, need to write a simple script based on the commands source code.:D (0 Replies)
Discussion started by: rahul_11d
0 Replies
7. Shell Programming and Scripting
Experts,
I am newbie in shell scripting. I want to write Bash shell scripts corresponding to windows bat files. I have installed cygwin at c:\cygwin and i am trying to crate the sh file using vi editor. i am not able to understand how to use linux/unix convention for the code. following is my... (15 Replies)
Discussion started by: rajuchacha007
15 Replies
8. What is on Your Mind?
Please, I beg you, “Stop!” Yes, stop writing scripts and instead build workflows.
Programmers, Sys-Admins, System Support, I'm talking to you.
Ok, I know in this community I'm going to get some serious backlash for my statements but I truly believe in my statement.
There was a time when... (13 Replies)
Discussion started by: mikemazz
13 Replies
9. Shell Programming and Scripting
Hi,
I wanted to load data from HDFS to HIVE by writing bash script.
Description:
I have written a bash script to validate the data and loaded validated data from local file system to HDFS. Now in the same bash script i wanted to load the data from HDFS to HIVE. How can i do it ? Also how tyhe... (2 Replies)
Discussion started by: shree11
2 Replies
10. Shell Programming and Scripting
Hi,
I have a script file where i'm validatig the input file and storing the validated records on HDFS.
I wanted to load data from HDFS to HBASE using pig script. So for that i have created a HBASE table and written pig script to load data from HDFS to HBASE which is working fine. Now i wanted... (0 Replies)
Discussion started by: shree11
0 Replies
SETUID(1) General Commands Manual SETUID(1)
NAME
setuid - run a command with a different uid.
SYNOPSIS
setuid username|uid command [ args ]
DESCRIPTION
Setuid changes user id, then executes the specified command. Unlike some versions of su(1), this program doesn't ever ask for a password
when executed with effective uid=root. This program doesn't change the environment; it only changes the uid and then uses execvp() to find
the command in the path, and execute it. (If the command is a script, execvp() passes the command name to /bin/sh for processing.)
For example,
setuid some_user $SHELL
can be used to start a shell running as another user.
Setuid is useful inside scripts that are being run by a setuid-root user -- such as a script invoked with super, so that the script can
execute some commands using the uid of the original user, instead of root. This allows unsafe commands (such as editors and pagers) to be
used in a non-root mode inside a super script. For example, an operator with permission to modify a certain protected_file could use a
super command that simply does:
cp protected_file temp_file
setuid $ORIG_USER ${EDITOR:-/bin/vi} temp_file
cp temp_file protected_file
(Note: don't use this example directly. If the temp_file can somehow be replaced by another user, as might be the case if it's kept in a
temporary directory, there will be a race condition in the time between editing the temporary file and copying it back to the protected
file.)
AUTHOR
Will Deich
local SETUID(1)