05-19-2017
Unix red hat OS, bash shell, can you please write some code as I am very new to this Unix.
Thanks in advance
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
How to send mails to multiple users using a single mailx command.
Urgently require help
Thanks in advance
Rgds
Arunava (3 Replies)
Discussion started by: arunava_maity
3 Replies
2. Shell Programming and Scripting
Hi,
I need to write one unix script gor sending a mail notification.
I have to pass the followinf as arguments,from ,to,subject,messege body
Can i use mailx....Please provide the code
Thanks in advance. (1 Reply)
Discussion started by: sudhi
1 Replies
3. UNIX for Dummies Questions & Answers
Hi ,
I want to send mail in my script when i am not a super user.
Can some one help me on that ..
Regards,
Balamani (1 Reply)
Discussion started by: Balamani
1 Replies
4. Shell Programming and Scripting
Hi all,
I wrote a shell script to send a mail, it is not showing any errors but i didn't receive any mail
#!/bin/ksh
. ./set_mail_details.ksh
echo 'In script'
subject=$1
echo '\nsubject'
echo $1
echo "$subject" | sed 's/~/ /g' | read sub
body_of_email=$2
echo '\nBody'
echo $2... (7 Replies)
Discussion started by: deepaknbk
7 Replies
5. UNIX for Dummies Questions & Answers
rshstatus=`rsh -n lilo /db/p2/oracle/names9208/restart_names.sh`
if $rshstatus <>0 then
errstatus=1
mailx -s "xirsol8dr" ordba@xxx.com >> $log_dr
else if errstatus=0
echo "status to xirsol8dr successful"
can anyone provide if this is t he correct way to do this or is there a better way? (1 Reply)
Discussion started by: bpm12
1 Replies
6. UNIX for Dummies Questions & Answers
Is there a way to find out all users and the UNIX groups they belong to??
:) (3 Replies)
Discussion started by: Hangman2
3 Replies
7. Shell Programming and Scripting
Dear all,
The perl script to send e-mail is working in my current script.
#This part of the script will send the email notification
my $to='mohamed.rahman@noridian.com';
my $from='xyz@hotmail.com';
my $subject='POS_CODES_38 DATA LOADED SUCCESSFULLY.';
my $message='The total no. of files... (2 Replies)
Discussion started by: msrahman
2 Replies
8. Shell Programming and Scripting
I have a file 1.txt which has 3 mail ids as below:
Maillist=abc@gmail.com def@gmail.com rcg@gmail.com
Now I want to write a script which will read this file and send the mail to all the users present in this file. (6 Replies)
Discussion started by: Vivekit82
6 Replies
9. Shell Programming and Scripting
Hi All
I am trying to do ssh to different server and on the remote server for each user trying to get groups of that user but i am not getting the required
result.
ssh username@ip_address "for i in $( cat /etc/passwd| cut -d: -f1);do groups $i done;exit" >>abc.txt
only names are... (5 Replies)
Discussion started by: Ekamjot
5 Replies
10. Shell Programming and Scripting
Hi Guys,
I am not Good at scripting.
I need to write a script such that if output of command shows the particular word in output then send mail to abc@compay.com
-bash-3.2$ ps -ef | grep bpbkar
root 6040 1 0 13:05:19 ? 0:00 bpbkar -r 2678400 -ru root -dt 47395 -to 0... (20 Replies)
Discussion started by: manalisharmabe
20 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 filename 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)