10-18-2012
Yes, I know what you mean. I remember when I was starting with Linux, I didn't understand shell very well, and tried to write most of everything in Perl. This didn't make bash stupid, or eval necessary, I simply didn't know what I was doing.
Quote:
But seriously using eval cannot be so harmful...It's just re-evaluation of strings.
Yes. Yes, it can.
Imagine that you're feeding variables containing filenames into eval. Did you know that
`rm -Rf ~/` is a valid filename?
Using eval lets external things inject whatever code they want into your program unless done very
very carefully. If you don't know enough to avoid eval, you probably don't know how to use it safely either.
Last edited by Corona688; 10-18-2012 at 02:15 PM..
10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
If I want to do high-end 3d animation, what skell scripting languages, and programming languages shoul I learn?
If you know any good resources for learning these languages they would be appreciated. (1 Reply)
Discussion started by: aloysius1001
1 Replies
2. UNIX for Advanced & Expert Users
I have never programmed in Perl (insert laughter, mock, etc. here ____) - so I need a sort of "Programming in Perl" covering the basics.
I now have two Perl books, one is a 5 volume Unix resource kit, the other is "Mastering algorithms with Perl" - none of them explains how to produce "hello,... (11 Replies)
Discussion started by: AtleRamsli
11 Replies
3. News, Links, Events and Announcements
Check the essays out.
http://www.paulgraham.com (0 Replies)
Discussion started by: photon
0 Replies
4. What is on Your Mind?
Can someone suggest any online venues to assist in recruiting a senior C programmer (looking for someone interested in working on kerberos code).
I've tried a bunch of the open source and higher ed lists (this is for Univ. of Michigan). The commercial services such as Dice or monster yield a... (7 Replies)
Discussion started by: painman
7 Replies
5. What is on Your Mind?
Post what languages (including scripting) you know, why and where you think that language is most usable. Also include libraries in which you're really good at (libusb, gtk, qt, etc).
assembly?
C or C++?
perl or python?
pascal?
bash or csh/tcsh?
opengl?
gtk or qt?
mono? (27 Replies)
Discussion started by: redoubtable
27 Replies
6. Shell Programming and Scripting
value of i = solarisbox
ssh $i "cat /etc/hosts | sed "s/$i\.local\.//" | sed "s/$i\./$i/" | sed "s/$i/$i.sol.com/" > /usr/users/chidori/edit_hosts"While running the above one liner its i am not able to make the changes and write it to the file /usr/users/chidori/edit_hosts . I know there is a... (2 Replies)
Discussion started by: chidori
2 Replies
7. Programming
i have MOTIF installed X11
a easy program is saved as hello.c
there is the following message
where can i get the X11/intrinsic.h , file ???
need help to compile
my system : MX-16 Linux Debian Jessie / i386
hans@mx1:~/Documents
$ cc push.c -o push -lXm -lXt -lX11
In file included from... (0 Replies)
Discussion started by: Zabo
0 Replies
8. Forum Support Area for Unregistered Users & Account Problems
When I visit Programmers forum my ESET Nod32 detects TrojanDownloader.Pegel.BH.trojan
I don't know when it started, as I visited the site today after staying off-line a few days. (2 Replies)
Discussion started by: migurus
2 Replies
9. What is on Your Mind?
While working on my current "UNIX history project" I ran across this:
Jerry Saltzer created an online scanned copy of the Multics Systems Programmers' Manual (MSPM) in this directory.
Based on the 1969-04-01 MSPM, the repo comprising 996 PDF files.
In order to help preserver the MSPM, ... (1 Reply)
Discussion started by: Neo
1 Replies
10. What is on Your Mind?
Hi guys and gals...
A mildly humourous blog from 2013, but I come into this category... ;oDD
Languager: The Poorest Computer Users are Programmers (0 Replies)
Discussion started by: wisecracker
0 Replies
UUX(1C) UUX(1C)
NAME
uux - unix to unix command execution
SYNOPSIS
uux [ - ] command-string
DESCRIPTION
Uux will gather 0 or more files from various systems, execute a command on a specified system and send standard output to a file on a spec-
ified system.
The command-string is made up of one or more arguments that look like a shell command line, except that the command and file names may be
prefixed by system-name!. A null system-name is interpreted as the local system.
File names may be one of(1) a full pathname;
(2) a pathname preceded by ~xxx; where xxx is a userid on the specified system and is replaced by that user's login directory;
(3) anything else is prefixed by the current directory.
The `-' option will cause the standard input to the uux command to be the standard input to the command-string.
For example, the command
uux "!diff usg!/usr/dan/f1 pwba!/a4/dan/f1 > !fi.diff"
will get the f1 files from the usg and pwba machines, execute a diff command and put the results in f1.diff in the local directory.
Any special shell characters such as <>;| should be quoted either by quoting the entire command-string, or quoting the special characters
as individual arguments.
FILES
/usr/uucp/spool - spool directory
/usr/uucp/* - other data and programs
SEE ALSO
uucp(1)
D. A. Nowitz, Uucp implementation description
WARNING
An installation may, and for security reasons generally will, limit the list of commands executable on behalf of an incoming request from
uux. Typically, a restricted site will permit little other than the receipt of mail via uux.
BUGS
Only the first command of a shell pipeline may have a system-name!. All other commands are executed on the system of the first command.
The use of the shell metacharacter * will probably not do what you want it to do.
The shell tokens << and >> are not implemented.
There is no notification of denial of execution on the remote machine.
UUX(1C)