I am getting duplicate entry in variable temp for example temp=2|2|3|4|4.
I was trying to get the temp=2|3|4. So I added sort -u at last, but not getting. it is right way to get using sort -u or any other options are available.
One of the senior administrators gave me a shell script to modify and it begins as follows:
if ] && ]
{more code follows}
Why the double square brackets? (10 Replies)
Hi
First apologies if this has been raised before.
I've got the following in a ksh script:
if ]
For some reason this does not work. But if I remove the double square brackets to:
if
This works.
I thought ksh supported the ]. Or is there more to it?
Thanks in advance. (3 Replies)
Hi,
I just came across an interesting shell script syntax like the one below:
] && (trap 'rm -rf ${WORK_DIR}/*.$$; echo "\n\nInterrupted !!\n\n"; exit 4' 1 2 3 15)
Can someone please explain the code snippet above?
The trap command bit is fine but ] && is the hazy part.
Generally we use an... (2 Replies)
Hello,
Can someone please explain to me the following line,
] && break
I do not understand why two test square brackets are used.
Thanks,
Shantanu
---------- Post updated at 03:38 PM ---------- Previous update was at 03:35 PM ----------
And, also why there's a $ before (echo $c |... (5 Replies)
Hi All,
I have a text file which looks like this:
computer programming
systems engineering
I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this:
computer programming
systems engineering
I am using... (3 Replies)
Hi frieds, I don't understand the difference between single square bracket and double square brackets in a IF condition.
Ex.
if ;
then
RETURNJOB=1
else
RETURNJOB=0
fi
It run, but this
if ];
then
RETURNJOB=1
else
RETURNJOB=0
fi (4 Replies)
I wanted to compare the value inside the Squre bracket after Colon ( : ) based on any value(seperated by or operator | ) inside the variable Thread and if match found then wnated to store in output file
Input file :
20140320 00:08:43.918 INO 35] - Corporate hub is
20140320 00:08:43.918... (2 Replies)
Hello all,
I have the following problem:
$ cat infile
this is spam and i need this too
this is spam and i need this too
$ perl -nwe '$_ =~ /]+ \]+)\]\]*\]? (\+)$/; print "$1 - $2\n";' infile
i need this - too
i need this - and i need this too
I am not sure how many occurences of... (13 Replies)
Hi All,
Hope you all are doing good. Yesterday in my project i came across a scenario which i can not guess why it was working in one region and why it was not in another region. Please find my issue below.
I am using AIX version 6.0 of UNIX in my project, in shell scripting i have the... (1 Reply)
Discussion started by: mad man
1 Replies
LEARN ABOUT ULTRIX
arp
arp(8c)arp(8c)Name
arp - address resolution display and control
Syntax
arp -a [vmunix] [kmem]
arp [-d] hostname
arp -f filename
arp -s hostname ether_addr [temp] [pub] [trail]
Description
The program displays and modifies the Internet-to-Ethernet address translation tables used by the address resolution protocol
The hostname is the name of the host system for which information will be displayed or modified.
With no flags, the program displays the current ARP entry for hostname.
Options-a Displays current Address Resolution Protocol (ARP) entries from the specified name list and core files (next arguments). If not spec-
ified, uses and respectively.
-d Deletes the entry for the host specified by name (next argument).
-f Reads information from the specified file (next argument) and modifies entries accordingly. Entries in the file should be of the fol-
lowing form, with argument meanings as given previously:
hostname ether_addr [ temp ] [ pub ] [ trail ]
-s Creates an ARP entry for the host called hostname with the Ethernet address ether_addr. The Ethernet address is given as six hexadec-
imal bytes separated by colons. The entry will be permanent unless the word temp is given in the command. If the word pub is given,
the entry will be published. That is, the system will act as an ARP server, responding to requests for hostname even though the host
address is not its own. The word trail indicates that trailer encapsulations may be sent to this host.
See Alsoarp(4p), ifconfig(8c)arp(8c)