Sponsored Content
Operating Systems Solaris Whats the syntax for 'cut' in following? Post 302321422 by ak835 on Monday 1st of June 2009 05:54:58 AM
Old 06-01-2009
MySQL

thanks guys

both things work...

one small change for linux is

Code:
/sbin/ifconfig| awk '/^eth[0-9]/ {print $1}'


now on my solaris box ,i wrote following to get MAC address

Code:
arp -a | grep "<hostname>" | grep "<interface_name>" | head -1 | awk '{print $5}'

i get data pertaining to physical interfaces as 'arp' returns only those.

i need to see if i can write something like this:

say there are two logical interfces 'ceo:1','ce0:2',then it should bear same MAC address as that of 'ce0'.

any code suggestion is welcome !!

Regards
Abhi
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Whats wrong with the syntax

Whats wrong with below logic or syntax???? (4 Replies)
Discussion started by: dsravan
4 Replies

2. Shell Programming and Scripting

Cut Command error cut: Bad range

Hi Can anyone what I am doing wrong while using cut command. for f in *.log do logfilename=$f Log "Log file Name: $logfilename" logfile1=`basename $logfilename .log` flength=${#logfile1} Log "file length $flength" from_length=$(($flength - 15)) Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies

3. Shell Programming and Scripting

Function works, trigger causes syntax error, whats my fault??

Needing a hint. Creating that function called Meter my simple script works well. What I want now is to start the last four commented lines to include or trigger a reaction, if there are more than n lines in that .txt-file it shall display that message for example. But the interpreter says there is... (3 Replies)
Discussion started by: 1in10
3 Replies

4. UNIX for Beginners Questions & Answers

Cut command: can't make it cut fields

I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies

5. Shell Programming and Scripting

Using :<<cut / cut to comment out block of bash script

I am using : << cut / cut to comment out block of code. Works fine on few lines of script, then it gives me this cryptic error when I try to comment out about 80 lines. The "warning " is at last line of script. done < results 169 echo "END read all positioning parameters" 170... (8 Replies)
Discussion started by: annacreek
8 Replies
nca.if(4)							   File Formats 							 nca.if(4)

NAME
nca.if - the NCA configuration file that specifies physical interfaces SYNOPSIS
/etc/nca/nca.if DESCRIPTION
Specify the physical interfaces for which the Solaris Network Cache and Accelerator ("NCA") feature will be configured in the nca.if con- figuration file. List the physical interfaces in the file, one per line. To configure NCA to listen on all physical interfaces present on the system backed by a hostname.{interface_name}, then list only an asterik ("*") in nca.if. When the ncakmod(1) initialization script is invoked during system boot, it will attempt to configure each physical interface specified in the nca.if file by using ncaconfd(1M). Note that there must be an accompanying hostname.{interface_name} file and an entry in /etc/hosts for the contents of hostname.{interface_name}. You must reboot in order to implement changes to the nca.if file. EXAMPLES
x86 Example 1 nca.if on x86 The following is an example of an nca.if file that would be used on an x86 system: iprb1 iprb6 iprb8 SPARC Example 2 nca.if on SPARC The following is an example of an nca.if file that would be used on a SPARC system: hme2 hme3 hme4 All Platforms Example 3 Configuring NCA to Listen on All Physical Interfaces The following example shows the contents of an nca.if file that would be used to configure either platform to listen on all physical inter- faces present on the system: * FILES
/etc/nca/nca.if Lists the physical interfaces on which NCA will run. /etc/hostname.{}{0-9} Lists all physical interfaces configured on the server. /etc/hosts Lists all host names associated with the server. Entries in this file must match with entries in /etc/host- name.{}{0-9} for NCA to function. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWncar | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
nca(1), ncab2clf(1), ncakmod(1), ifconfig(1M), ncakmod.conf(4), ncalogd.conf(4), attributes(5) System Administration Guide: IP Services SunOS 5.11 18 Feb 2003 nca.if(4)
All times are GMT -4. The time now is 08:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy