Hi
I need some help on SED command
I am writing a shell script which does the following:
1. Read one line at a time from a file abc.txt which has millions of lines
2. Prefix each line read with some text "
3. Post fix each line read with a quote "
4. Write the new modified... (11 Replies)
I know there are caveats about using read in pipelines because read is treated by a subshell. I know this but I can't think of any way to accomplish this regardless, I'm still a rookie.
I hope somebody will be able to interpret what it is that I'm trying to accomplish and correct me.
... (2 Replies)
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)
Hi All
I have something that from the outset seems really trivial but in practice is not quite working.
I have the following code sample in my shell script which illustrates the problem
echo "enter home directory"
read home
mkdir $home/newdir
The user then enters a logical $HOME... (3 Replies)
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
I cannot get the following substitution ($ORACLE_SID) to work:
The variable ORACLE_SID is set to wardin my environment. It has been exported.
I have a text file called test.dat:
/u07/oradata/${ORACLE_SID}/extab/finmart/summit/ps_voucher_line_crnt_ex.dbf... (2 Replies)
Hello Team,
I have the following line in a .sh file .That means if we add my file.sh file to crontab .The crontab will read the first line where the db2 profile is installed.Can some body help me how to recode this using a variable ?
That means the below path is static to a perticular... (3 Replies)
I have the following:
#! /bin/bash
foo="bar"
this="that"
vars="foovar=$foo\n\
thisvar=$this\n"
I want to write the following to a file:
foovar="bar"
thisvar="that"
Then in another script, I pull this file, and loop through it:
while read line; do
eval $line
done <... (3 Replies)
I am trying to keep variables in a file.
if I have all variables at the same time, I can write them all like below.
echo $var1","$var2","$var3
But, these variables are being calculated at different times then they are lost
so I want to keep them in a file seperated by "," .
echo... (5 Replies)
Hi Folks,
I'm currently trying to read several values into different variables.
Actually, what I'm doing works, but I get an error message.
My attempts are:
read strCPROC strIPROC strAPROC <<<$(ssh -n -T hscroot@$HMC "lshwres -r proc -m $strIDENT --level sys -F \"configurable_sys_proc_units... (11 Replies)
Discussion started by: NKaede
11 Replies
LEARN ABOUT DEBIAN
snmpset
SNMPSET(1) Net-SNMP SNMPSET(1)NAME
snmpset - communicates with a network entity using SNMP SET requests
SYNOPSIS
snmpset [COMMON OPTIONS] OID TYPE VALUE [OID TYPE VALUE]...
DESCRIPTION
snmpset is an SNMP application that uses the SNMP SET request to set information on a network entity. One or more object identifiers
(OIDs) must be given as arguments on the command line. A type and a value to be set must accompany each object identifier. Each variable
name is given in the format specified in variables(5).
The TYPE is a single character, one of:
i INTEGER
u UNSIGNED
s STRING
x HEX STRING
d DECIMAL STRING
n NULLOBJ
o OBJID
t TIMETICKS
a IPADDRESS
b BITS
Most of these will use the obvious corresponding ASN.1 type. 's', 'x', 'd' and 'b' are all different ways of specifying an OCTET STRING
value, and the 'u' unsigned type is also used for handling Gauge32 values.
If you have the proper MIB file loaded, you can, in most cases, replace the type with an '=' sign. For an object of type OCTET STRING this
will assume a string like the 's' type notation. For other types it will do "The Right Thing".
For example:
snmpset -c private -v 1 test-hub system.sysContact.0 s dpz@noc.rutgers.edu ip.ipforwarding.0 = 2
will set the variables sysContact.0 and ipForwarding.0:
system.sysContact.0 = STRING: "dpz@noc.rutgers.edu"
ip.ipForwarding.0 = INTEGER: not-forwarding(2)
If the network entity has an error processing the request packet, an error packet will be returned and a message will be shown, helping to
pinpoint in what way the request was malformed.
OPTIONS
snmpset takes the common options described in the snmpcmd(1) manual page.
SEE ALSO snmpcmd(1), variables(5).
4th Berkeley Distribution 08 Feb 2002 SNMPSET(1)