10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have a below syntax its working fine...
var12=$(ps -ef | grep apache | awk '{print $2,$4}')
Im getting expected output as below:
printf "%b\n" "${VAR12}"
dell 123
dell 456
dell 457
Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies
2. Shell Programming and Scripting
Hi,
My aim is to get the md5 hash of a file and store it in a variable.
var1="md5sum file1"
$var1
The above outputs fine but also contains the filename, so somthing like this 243ASsf25 file1
i just need to get the first part and put it into a variable.
var1="md5sum file1"... (5 Replies)
Discussion started by: JustALol
5 Replies
3. Shell Programming and Scripting
OSX 10.9
How does "defaults" know where to look for .plists? To expand:
defaults read com.apple.finder
is located in ~/Library/Preferences
but,
defaults read com.apple.mail
is located in ~/Library/Containers/com.apple.mail/Data/Library/Preferences/com.apple.mail.plist
So my question... (0 Replies)
Discussion started by: sudo
0 Replies
4. Shell Programming and Scripting
My script below seems to be choking because I need the the output of the find command to be stored as a variable that can then be called by used lower in the script.
#!/bin/bash
cd "/resumes_to_be_completed"
var1=find . -mmin -1 -type f \( -name "*.doc" -o -name "*.docx" \)... (1 Reply)
Discussion started by: binary-ninja
1 Replies
5. Shell Programming and Scripting
Hi All,
Hope someone can advise here as I have been struggling to find a syntax that works here. I have tried a stack of combination I have seed in the forums but I think because I have needed to use "" and `` in the statments another method is found.
I am reading in lines with the following... (1 Reply)
Discussion started by: nkwilliams
1 Replies
6. UNIX for Dummies Questions & Answers
I'm sure this is a simple thing but I can't figure it out. In a script that I'm writing, I'd like to be able to store each line of output from "ls -l" into a variable. Ultimately I'd like to end up with something like:
for a in `ls -l`
do something with $a
doneBut that's reading each... (2 Replies)
Discussion started by: ewoods
2 Replies
7. UNIX Desktop Questions & Answers
Hi,
i have some files in one directory(say some sample dir) whose names will be like the following.
some_file1.txt
some_file2.txt.
i need to get the last modified file size based on file name pattern like some_
here i am able to get the value of the last modified file size using the... (5 Replies)
Discussion started by: eswarreddya
5 Replies
8. UNIX for Dummies Questions & Answers
Hi there,
I'm trying to retrieve a value from a plist file, which I have done before with no problems, however this plist file looks a little different....
Normally it's like this;
<plist version="1.0">
<dict>
key>KeyName</key>
<string>blah</string>
I want the value of KeyName, so... (1 Reply)
Discussion started by: davewg
1 Replies
9. UNIX for Dummies Questions & Answers
Hi unix gurus,
I am trying to store the result of a command into a variable.
But it is not getting stored.
x='hello'
y=echo $x | wc -c
but it is giving the output as 0(zero)
Pls help me its very urgent (7 Replies)
Discussion started by: ravi raj kumar
7 Replies
10. Shell Programming and Scripting
HI
I am trying to store the output of this awk command
awk -F, {(if NR==2) print $1} test.sr
in a variable when I am trying v= awk -F, {(if NR==2) print $1} test.sr
$v = awk -F, {(if NR==2) print $1} test.sr
but its not working out .
Any suggestions
Thanks
Arif (3 Replies)
Discussion started by: mab_arif16
3 Replies
Info::Layer3::C4000(3pm) User Contributed Perl Documentation Info::Layer3::C4000(3pm)
NAME
SNMP::Info::Layer3::C4000 - SNMP Interface to Cisco Catalyst 4000 Layer 2/3 Switches running IOS
AUTHOR
Bill Fenner
SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
my $c4000 = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
# These arguments are passed directly to SNMP::Session
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.
";
my $class = $c4000->class();
print "SNMP::Info determined this device to fall under subclass : $class
";
DESCRIPTION
Abstraction subclass for Cisco Catalyst 4000 Layer 2/3 Switches.
For speed or debugging purposes you can call the subclass directly, but not after determining a more specific class using the method above.
my $c4000 = new SNMP::Info::Layer3::C4000(...);
Inherited Classes
SNMP::Info::CiscoVTP
SNMP::Info::CDP
SNMP::Info::CiscoStats
SNMP::Info::CiscoImage
SNMP::Info::CiscoPortSecurity
SNMP::Info::CiscoConfig
SNMP::Info::MAU
SNMP::Info::Layer3
Required MIBs
Inherited Classes' MIBs
See "Required MIBs" in SNMP::Info::CiscoVTP for its own MIB requirements.
See "Required MIBs" in SNMP::Info::CDP for its own MIB requirements.
See "Required MIBs" in SNMP::Info::CiscoStats for its own MIB requirements.
See "Required MIBs" in SNMP::Info::CiscoImage for its own MIB requirements.
See "Required MIBs" in SNMP::Info::CiscoPortSecurity for its own MIB requirements.
See "Required MIBs" in SNMP::Info::CiscoConfig for its own MIB requirements.
See "Required MIBs" in SNMP::Info::MAU for its own MIB requirements.
See "Required MIBs" in SNMP::Info::Layer3 for its own MIB requirements.
GLOBALS
These are methods that return scalar value from SNMP
Overrides
$c4000->cisco_comm_indexing()
Returns 1. Use vlan indexing.
$c4000->fan()
Returns fan status
Global Methods imported from SNMP::Info::CiscoVTP
See documentation in "GLOBALS" in SNMP::Info::CiscoVTP for details.
Globals imported from SNMP::Info::CDP
See documentation in "GLOBALS" in SNMP::Info::CDP for details.
Globals imported from SNMP::Info::CiscoStats
See documentation in "GLOBALS" in SNMP::Info::CiscoStats for details.
Globals imported from SNMP::Info::CiscoImage
See documentation in "GLOBALS" in SNMP::Info::CiscoImage for details.
Globals imported from SNMP::Info::CiscoPortSecurity
See documentation in "GLOBALS" in SNMP::Info::CiscoPortSecurity for details.
Globals imported from SNMP::Info::CiscoConfig
See documentation in "GLOBALS" in SNMP::Info::CiscoConfig for details.
Globals imported from SNMP::Info::MAU
See documentation in "GLOBALS" in SNMP::Info::MAU for details.
Globals imported from SNMP::Info::Layer3
See documentation in "GLOBALS" in SNMP::Info::Layer3 for details.
TABLE METHODS
These are methods that return tables of information in the form of a reference to a hash.
Overrides
$c4000->i_duplex()
Parses mau_index and mau_link to return the duplex information for interfaces.
$c4000->i_duplex_admin()
Parses "mac_index","mau_autostat","mau_type_admin" in order to find the admin duplex setting for all the interfaces.
Returns either (auto,full,half).
$c4000->i_speed_admin()
Returns administrative speed for interfaces.
Table Methods imported from SNMP::Info::CiscoVTP
See documentation in "TABLE METHODS" in SNMP::Info::CiscoVTP for details.
Table Methods imported from SNMP::Info::CDP
See documentation in "TABLE METHODS" in SNMP::Info::CDP for details.
Table Methods imported from SNMP::Info::CiscoStats
See documentation in "TABLE METHODS" in SNMP::Info::CiscoStats for details.
Table Methods imported from SNMP::Info::CiscoImage
See documentation in "TABLE METHODS" in SNMP::Info::CiscoImage for details.
Table Methods imported from SNMP::Info::CiscoPortSecurity
See documentation in "TABLE METHODS" in SNMP::Info::CiscoPortSecurity for details.
Table Methods imported from SNMP::Info::CiscoConfig
See documentation in "TABLE METHODS" in SNMP::Info::CiscoConfig for details.
Table Methods imported from SNMP::Info::MAU
See documentation in "TABLE METHODS" in SNMP::Info::MAU for details.
Table Methods imported from SNMP::Info::Layer3
See documentation in "TABLE METHODS" in SNMP::Info::Layer3 for details.
perl v5.12.4 2011-09-28 Info::Layer3::C4000(3pm)