execute a command silently or quietly within a shell
How do I suspend output of commands and tools that sometimes utter unwanted output? I know that I can always pipe to null or some such thing, but is there a simpler more elegant (i.e. accepted) practice?
I really have to learn to phrase more carefully. I didn't mean to imply error output, but really just the FYI kind of messages that might complement the actual work or output of a tool. Something like "...done. 5 instances found", where the work was desired, but the chit chat wasn't.
If I remember correctly, in DOS this was accomplished by preceding the statement with an apostrophe. Now it's done by "echo off".
friends,
i have application commands to execute in shell script it is something like this. i will login with user data it takes me to $ prompt. Example given below
login: data
ps : xxxx
$ MNSinput --this takes me to greater than prompt >
> ops --this is command i enter this output... (7 Replies)
Hello,
I need to execute below command in shell script
srvctl relocate service -d $database -s $service -i $avail -t $pref -f and also need to get the errors ,if any,in another file.
What's the right way to execute such commands in shell script?
Best regards,
Vishal (1 Reply)
I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found"
My code is as follows:
--------------------------
#!/bin/sh
user="test"
DIR="/bldtmp/"$user
VIEW="test.view1"
echo "TMPDIR before export... (4 Replies)
Hi ,
I have to write a shell script to telnet to specific host and execute the admin command there. Please help me to do that.
Eg : telnet hostname portno
admin command
exit (3 Replies)
Hi,
I need to run a script whenever the Cron file is modified.
The requirement is whenever a user modifies the cron file, the script should run automatically.
Can you please provide your inputs ? (5 Replies)
Hello all,
I have just started doing shell scripting.
I want to read a file which stores the status of my job I have submitted
on a cluster.
The file looks something like this :
========================FILE=============================
crab: Checking the status of all jobs: please wait... (4 Replies)
Hi ,
I am new to UNIX and Shell scripting . I am not able to execute a shell file . I try to do it using the below command.
./start.sh
but it shows an error that 'cannot execute ' what might be the reason for this? pls help me to resolve it. (1 Reply)
Hi, i facing a problem when run the script below..
while
do
if
then
printf "Please enter a name : "
read response # the problem occur here
if
then
ea_ident=${omc_ident}
else
#
# Check that name does not contain invalid... (14 Replies)
I don't know why the following shell script doesn't work. Could you please help me out?
#!/usr/bin/ksh
test="cal > /tmp/tmp.txt 2>&1"
$test
I know it will work for the following format:
#!/usr/bin/ksh
cal > /tmp/tmp.txt 2>&1
However, I need to get the command from the user in... (1 Reply)
Hi
I have this below script...I want to execute the shell command "rm" in the below script
but it is not working. Can anybody why so?
I got the below error
rm: /users/amvarma is a directory
sh: /*-log*: not found
-------------------
$u=`whoami`;
print "$u\n";
$op_1=$ARGV; # for... (0 Replies)