04-03-2008
shell-programming-scripting
Thx you for answer i have try to do a
shell-programming-scripting
but iam geting errors line 2: syntax error near unexpected token `('
#!/bin/sh
echo Uname (New Version)
/bin/uname.orig
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want replace 2.6.15-25-server with 2.6.17 ?
$uname -r
2.6.15-25-server
1) mv /bin/uname /bin/uname.orig
2) put the following in the new /bin/uname:
#!/bin/sh
echo Uname (New Version)
/bin/uname.orig
:confused: (3 Replies)
Discussion started by: pop_black
3 Replies
2. Shell Programming and Scripting
Hw to change the font color and size of output in perl (2 Replies)
Discussion started by: trupti_rinku
2 Replies
3. Shell Programming and Scripting
I have a applicaton , when run /tmp/my_script , that will output the result to the screen ( as below ) , the output is very long ( about 1500 lines ) , I have a program ( as below ) that will show the output with function 1 > 1 , it works fine , however , the output only show page 1 of this 1500... (5 Replies)
Discussion started by: ust
5 Replies
4. Shell Programming and Scripting
I'm very new to writing scripts, so here is my problem...I have the following code already written (in perl)
system "rm file2";
open(FILE2, ">file2");
open(MYINPUTFILE, "file");
while(<MYINPUTFILE>) {
my($line) = $_;
chomp($line);
print file2 "$line\n";
print... (2 Replies)
Discussion started by: ddrew78
2 Replies
5. Emergency UNIX and Linux Support
<key>ExcludeSimpleHostnames</key>
<integer>0</integer>
<key>FTPPassive</key>
Need simple command that will change the 0 to a 1 in this file when I grep it, but only for this integer key directly after the ExcludeSimpleHostnames key.
I got this output code... (8 Replies)
Discussion started by: glev2005
8 Replies
6. Shell Programming and Scripting
I have a file which has following contents
usmtnz-dinfsi19
62
61
18400
18800
99.7
usmtnz-dinfsi19
62
61
18400
18800
99.7
i want the o/p to be like
date (7 Replies)
Discussion started by: fugitive
7 Replies
7. Shell Programming and Scripting
when i run the following command
db2 list tablespaces
Tablespaces for Current Database
Tablespace ID = 0
Name = SYSCATSPACE
State = 0x0000
Tablespace ID ... (3 Replies)
Discussion started by: lazydev
3 Replies
8. Shell Programming and Scripting
Currently, i am trying to create a simple robust script that is intended to move the contents of a given source directory to a target directory. Optionally, the script should allow to either move the whole source dir content, or dotfiles only, or visible files only. I am aware the target directory... (0 Replies)
Discussion started by: shells_bells
0 Replies
9. UNIX for Dummies Questions & Answers
Can anyone please let me know the meaning of output of uname -a ?
I am totally new to unix or linux and just thinking to start learning.
When I run uname -a the output I get is -
"Linux blx28ap01 2.6.18-238.12.1.el5 #1 SMP Sat May 7 20:18:50 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux"
I want to... (7 Replies)
Discussion started by: csrohit
7 Replies
smrsh(1M) System Administration Commands smrsh(1M)
NAME
smrsh - restricted shell for sendmail
SYNOPSIS
smrsh -c command
DESCRIPTION
The smrsh program is intended as a replacement for the sh command in the prog mailer in sendmail(1M) configuration files. The smrsh program
sharply limits commands that can be run using the |program syntax of sendmail. This improves overall system security. smrsh limits the set
of programs that a programmer can execute, even if sendmail runs a program without going through an alias or forward file.
Briefly, smrsh limits programs to be in the directory /var/adm/sm.bin, allowing system administrators to choose the set of acceptable com-
mands. It also rejects any commands with the characters: ,, <, >, |, ;, &, $,
(<RETURN>), or
(<NEWLINE>) on the command line to pre-
vent end run attacks.
Initial pathnames on programs are stripped, so forwarding to /usr/ucb/vacation, /usr/bin/vacation, /home/server/mydir/bin/vacation, and
vacation all actually forward to/var/adm/sm.bin/vacation.
System administrators should be conservative about populating /var/adm/sm.bin. Reasonable additions are utilities such as vacation(1) and
procmail. Never include any shell or shell-like program (for example, perl) in the sm.bin directory. This does not restrict the use of
shell or perl scrips in the sm.bin directory (using the #! syntax); it simply disallows the execution of arbitrary programs.
OPTIONS
The following options are supported:
-c command
Where command is a valid command, executes command.
FILES
/var/adm/sm.bin directory for restricted programs
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsr, SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
sendmail(1M), , attributes(5)
SunOS 5.10 6 Nov 1998 smrsh(1M)