Here's what can be written without having touched perl for a long once time: a good bad example
I wish I could strike that, just to make sense at tyler_durden's post, otherwise I'd be glad to erase it.
Last edited by daPeach; 08-29-2009 at 06:47 PM..
Reason: the given code is an horror of errors
Hello,
I am new to Solaris.
I am using stand alone Solaris 10.0 for test/study purpose and connecting to internet via an ADSL modem which has DHCP server. My Solaris is working on VMWare within winXP. My WinXP and Solaris connects to internet by the same ADSL modem via its DHCP at the same... (1 Reply)
Hey,
I'm trying to print the first four characters of the hostname of a computer.
I can get it from using:
hostname -s | sed 's/...........$//'"
but this is when I know how many characters are in the computer name.
I dont understand why some like:
hostname -s | sed '/..../p'
wont... (7 Replies)
The code below prints outs each array element, but it always says the array length is 1 even though its not. What am i doing wrong?
function printArray(){
#here should check if it is an array and that an arg exits
echo "Priting array"
myarr="${@}"
echo... (2 Replies)
Hi All,
So we added a new HP-UX 11.31 machine. Copied OS via Ignite-UX (DVD)over from this machine called machine_a. It was supposed to be named machine_c. And it is when you log in...however when I'm in the ILO console before logging in, it says:
It should say:
What gives? And how do... (4 Replies)
Hi, as the title, I have an array @f_lines with gene information in it. How can I put the content of @f_lines into a file so that I can read it?
I tried this:
open(OUTPUT, "file"); # put gene information in this file;
@f_lines = ("gene1", "gene2", "gene3"...); # gene information;
print... (3 Replies)
Hello,
May i please know how do i print the array using awk script. I am using below shell script to start with but not working.
#!/bin/bash
LOADSTATUS="Line 0"
LOADSTATUS="Line 1"
LOADSTATUS="Line 2"
LOADSTATUS="Line 3"
LOADSTATUS="Line 4"
awk '
BEGIN {
Your File Load Status
}... (1 Reply)
I have test.sh file as below :
set -A IDARR $ID
echo | awk -f test.awk -v TempArr="${IDARR
}"
I have test.awk file as below :
BEGIN {
Flag = 1;
}
{
print "Hello";
for(i in TempArr)
{
print i;
}
} (9 Replies)
Hi
How to pass echo output to a variable ?
Does below awk command will get the last character of hostname and assign to a variable - "svr" ?
svr=$( echo `hostname` | awk '{print substr($0,length,1)}' )
Thanks.
Please use CODE tags when dsplaying code segments, sample input, and sample... (7 Replies)
Hi all,
i'm trying to gether multiple pattern on remote hosts, and trying to print hostname and the pattern,
ssh remoteserver1 -C 'hostname 2>&1;cat /var/log/server1.log | awk -F ";" '"'"'{ print " "$2" "$5}'"'"'| sort | uniq -c | sort -g -r '
The output is the following,
remoteserver1
... (8 Replies)
Discussion started by: charli1
8 Replies
LEARN ABOUT PLAN9
ipconfig
IPCONFIG(8) System Manager's Manual IPCONFIG(8)NAME
ipconfig, arpd, rip - Internet configuration and routing
SYNOPSIS
ip/ipconfig [-abp] [-e etherdev] [-m ip-mask] [ipaddr]
ip/arpd [-pd] [-e etherdev] [-b bcast-addr]
ip/rip [-b]
DESCRIPTION
Ipconfig configures an Internet connection on an Ethernet. The options are
a do not start arpd
b do not use BOOTP to discover a gateway address
p start arpd in promiscuous mode (see below)
e use the Ethernet mounted at /net/etherdev
m set the network mask to ip-mask
If ipaddr is specified on the command line, use that instead of one found in the local database or via the BOOTP protocol.
Arpd performs the Internet Address Resolution Protocol, translating Internet addresses into Ethernet addresses. It is normally started by
ipconfig. The options are
d print debugging to standard output
p (promiscuous) answer ARP requests for any recognized machine. The default is to answer just for the machine running arpd.
e use the Ethernet mounted at /net/etherdev
b use the IP broadcast address bcast-addr instead of the correct one.
Rip runs the routing protocol RIP. It listens for RIP packets on connected networks and updates the kernel routing tables. The only
option, -b, broadcasts routing information onto the networks.
SOURCE
/sys/src/cmd/ip/ipconfig.c
/sys/src/cmd/ip/arpd.c
/sys/src/cmd/ip/rip.c
SEE ALSO ndb(6)IPCONFIG(8)