10-12-2005
no one?
i just need a way to execute bash commands from Perl, such that when Perl reads a bash environment variable, it can tell bash to echo something, for example.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello guys,
While going over the book, I ran into this chess program and I have few questions
1) on line 40), why is not $chessboard-> ) ???
40 unless (defined $chessboard->) {
2)
20 foreach my $i (reverse (0..7)) { #Row
1 #!/usr/bin/perl -w
2 #
3 #
4
5
... (1 Reply)
Discussion started by: hankooknara
1 Replies
2. Shell Programming and Scripting
New to perl and a few questions - usually used to shell scripting but have to write a script to check a few things on windows server and need help..
1. Check for file missing in sequence..
ie. list of file in directory as follows:
file0001.txt
file0002.txt
file0004.txt
file0005.txt... (7 Replies)
Discussion started by: frustrated1
7 Replies
3. Shell Programming and Scripting
More questions for Perl on Windows (again I apologize its on windows... )
1. How can I check free disk space on a drive in windows using perl command in a script?
2. How can I check processes running using perl command (as I would normally be able to see in task manager for example)
3. I... (7 Replies)
Discussion started by: frustrated1
7 Replies
4. Shell Programming and Scripting
I need to write a script to telnet or ssh a device the execute some commands in device then copy the output in a file, I wrote the script but I faced one issue, when you execute some commands the device asked me a Question, for example :
device # copy run tftp
device # Source filename ?
... (3 Replies)
Discussion started by: DarkSoul
3 Replies
5. Shell Programming and Scripting
Hi,
So I started to learn perl a few days ago, and I have some problems...
One of my problems...
#!C:\Perl64\bin\perl.exe -w
use LWP::Simple;
print "Content-Type: Text/Plain\n\n";
sub pagelinks {
return @all = get($_) =~ /href\s*=\s*"?(+)/gis;
}
@a =... (5 Replies)
Discussion started by: byte1918
5 Replies
6. Shell Programming and Scripting
guys,
I need a steer in the right direction for this issue. it would be great if anyone of you can help me out.
i have a textfile where i want to swap the lines based on the user input.
The textfile is looks like the
#file 1 name
TB
#file 1 ID
1000
#
#file for ID1 system1... (3 Replies)
Discussion started by: mayi
3 Replies
7. Shell Programming and Scripting
Hello I have to do a program in Bash, need help because it does not go out for me and go enough time with this!!
Five directories(boards of directors) that more occupy, arranged according to size. To measure the size of every directory(board of directors) there must not be included the size of... (2 Replies)
Discussion started by: danihj
2 Replies
8. Shell Programming and Scripting
I am writing a Bash script that needs to get part of the current directory path. Let's say the current directory is /cat/dog/bird/mouse/ant. I know that the part that I want is between "bird/" and "/ant". In this case, I would want to set a variable to "mouse".
If the current directory were... (4 Replies)
Discussion started by: RickS
4 Replies
9. Shell Programming and Scripting
Hello everybody,
I isolated an issue: please try the following script (under AIX)
#!/usr/bin/ksh93
echo "Before Perl: \c"
read line
echo "|$line|"
perl -e 'print "Perl invocation";'
echo
echo "After Perl: \c"
read line
echo "|$line|"
On the first input, type Ctrl-D. It works... (13 Replies)
Discussion started by: jlovi
13 Replies
10. Shell Programming and Scripting
1. bash
-bash escape rules, esp. ',",
-how to use Ctrl+R reverse cmd search with regex?
2. mysql
-how to use grep in mysql
3. php
-why !0 is not evaluated to true? what's its value
-php getopt: what if there is duplicate in cmdline args (2 Replies)
Discussion started by: John_Peter
2 Replies
RBASH(1) General Commands Manual RBASH(1)
NAME
rbash - restricted bash, see bash(1)
RESTRICTED SHELL
If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is
used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the follow-
ing are disallowed or not performed:
o changing directories with cd
o setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV
o specifying command names containing /
o specifying a file name containing a / as an argument to the . builtin command
o specifying a filename containing a slash as an argument to the -p option to the hash builtin command
o importing function definitions from the shell environment at startup
o parsing the value of SHELLOPTS from the shell environment at startup
o redirecting output using the >, >|, <>, >&, &>, and >> redirection operators
o using the exec builtin command to replace the shell with another command
o adding or deleting builtin commands with the -f and -d options to the enable builtin command
o using the enable builtin command to enable disabled shell builtins
o specifying the -p option to the command builtin command
o turning off restricted mode with set +r or set +o restricted.
These restrictions are enforced after any startup files are read.
When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shell spawned to execute the script.
SEE ALSO
bash(1)
GNU Bash-4.0 2004 Apr 20 RBASH(1)