02-07-2017
I am sorry to say it but it seems that you lack so many basic fundamental things working with Unix/Linux and it also seems that all those really many threads of yours in the forum and all the answers you got, do not change a bit to that fact.
You might want to take a basic lesson in administering a system.
Because of this, I will set your account to read-only for 3 months so you have time to catch up a bit.
Cheers
zaxxon
This User Gave Thanks to zaxxon For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Experts,
I tried to make my cshell script interactive by asking the user for password and trying to read the input using the "read" command. I have been unsuccessful so far. Do you have any idea ?
Thanks
Jim (2 Replies)
Discussion started by: jimmynath
2 Replies
2. UNIX for Advanced & Expert Users
Can i run the SU command in a non interactive mode. What i want to do is to pass the username and the password as commandline or batch parameters. Please let me if its possible and how to pass them. A sample file will be appreciated.
Thanks, (6 Replies)
Discussion started by: rohitag
6 Replies
3. Shell Programming and Scripting
Hi,
I am new to shell scripting.I have written a very simple shell scipt that asks for the username and password on executing. i.e
echo "Enter username :"
read usrname;
echol "Enter password :";
read passwd;
echo usrname;
echo passwd;
but now I want to make it automatic , such... (2 Replies)
Discussion started by: bhaskar_m
2 Replies
4. UNIX for Dummies Questions & Answers
I have a strange situation. I'm running a shell script containing several data uploads (using Oracle sqlloader utility). This script is being run on a Red Hat server.
I tried to run it in background:
$ nohup upload.sh &
This script uploads some thousands files. After several hours I... (0 Replies)
Discussion started by: viniciov
0 Replies
5. Homework & Coursework Questions
Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines.
It then prompts for deletion of the file.
If user supplies arguments with the script , then it works on those files... (8 Replies)
Discussion started by: rits
8 Replies
6. AIX
Hello,
Script command helps to save command output to file. (Redicection doesn't work in this case).
Besides interactive shell 'recording', Linux script command has "-c" option which allows to record output of some non-interactive command.
The problem is that AIX script command variant... (6 Replies)
Discussion started by: vilius
6 Replies
7. Shell Programming and Scripting
I have a file with stats for different month, I use the cat and grep combination to search for different month.
cat <file> | grep "April"
cat <file> | grep "May"
cat <file> | grep "June"
etc.
How do you make this command interactive. So that I can give the values for the search. Thanks... (7 Replies)
Discussion started by: purelltab
7 Replies
8. Shell Programming and Scripting
Hi All,
I am writing a script(Auto_Installation.sh) which is calling one another script (./update_manager /spare/install/HO7/PME_Response_file.txt)
Now the issue is result of (./update_manager /spare/install/HO7/PME_Response_file.txt) script is
##########################################... (6 Replies)
Discussion started by: Dhruvak
6 Replies
9. Shell Programming and Scripting
Hello experts,
I have a to write script for monitoring, the script would use a command and I plan to write the script as follows
while true
do
command -arg
sleep 2
clear
done
The output would be set up on a screen for monitoring. However the issue is that the command used in... (2 Replies)
Discussion started by: maverick_here
2 Replies
10. Shell Programming and Scripting
Inorder to make the pkgadd non-interactive i tried couple of things but both failed.
1.
sudo pkgadd -n /u/mont/admin -d /u/mont/dbprd.pkg
pkgadd: ERROR: no packages were found in </var/spool/pkg>
2.
yes all | sudo pkgadd -a /u/mont/admin -d /u/mont/dbprd.pkg
... (0 Replies)
Discussion started by: mohtashims
0 Replies
LEARN ABOUT CENTOS
scsi_ch_swp
SCSI_CH_SWP(8) SDPARM SCSI_CH_SWP(8)
NAME
scsi_ch_swp - change SCSI Software WRITE Protect and block device settings
SYNOPSIS
scsi_ch_swp [--help] [--set 0|1] [--verbose] [--wr] BLK_DEVICE
DESCRIPTION
This bash shell script attempts to read or change the Software Write Protect (SWP) bit in the SCSI Control mode page using the sdparm util-
ity. If that change is successful then it uses the blockdev utility to change BLK_DEVICE's read-write or read-only setting in sympathy.
This script is only available in Linux since the blockdev utility is Linux specific.
If changing the SWP bit is supported, setting the SWP bit makes BLK_DEVICE read-only at the device (disk) itself. Clearing the SWP bit
makes BLK_DEVICE read-write which is usually the default setting at device (disk) power up.
If no options are given then the current state of the SWP bit is printed out (using sdparm) together with blockdev's RO bit. If they are
both 1 then BLK_DEVICE is in read-only mode; if they are both 0 then BLK_DEVICE is in read-write mode.
OPTIONS
Arguments to long options are mandatory for short options as well.
-h, --help
print out the usage message then exit.
-s, --set 0|1
when 0 is given then the SWP bit in the Control mode page is cleared (i.e. set that bit to 0) using sdparm; and blockdev is used to
set BLK_DEVICE to read-write mode. When 1 is given then the SWP bit in the Control mode page is set using sdparm; and blockdev is
used to set BLK_DEVICE to read-only mode. The default (i.e. when this option is not given) is to read the state of the SWP bit and
BLK_DEVICE's read-only mode and print those values out.
-v, --verbose
increase level or verbosity.
-w, --wr
when the BLK_DEVICE is in read-only mode, Linux will not typically allow BLK_DEVICE to be opened read-write by sdparm, so the
default action of this script is to use the sdparm --readonly option when --set 0 has been invoked. It is possible that BLK_DEVICE
could be a generic device (e.g. /dev/sg3) which has a different interpretation of the read-only open flag and may fail. For such
rare cases the --wr option makes sdparm open BLK_DEVICE read-write when --set 0 is invoked.
EXIT STATUS
The exit status of this script is 0 when it is successful. Otherwise the exit status is that of the sdparm or the blockdev utility, which-
ever is called last. See the sdparm(8) man page.
AUTHORS
Written by D. Gilbert
COPYRIGHT
Copyright (C) 2013 Douglas Gilbert
This software is distributed under a FreeBSD license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR-
POSE.
SEE ALSO
sdparm(sdparm), blockdev(8)
sdparm-1.08 May 2013 SCSI_CH_SWP(8)