12-17-2014
Looks unbalanced: ID="$count)"
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi guys,
We have different IP ranges in our LAN, for instance my system IP Add. is in 163.183.37.x range, in the meantime i wish to connect to our printer/plotter which is 163.183.4.x & our LAN in another location with 163.183.38.x.
What shoul i do except defining pesudo IP Add's? as a... (1 Reply)
Discussion started by: nikk
1 Replies
2. Programming
Hi ALL :
consider the given 2 codes:
//p1.c
#include<stdio.h>
FILE * fp;
main()
{
pid_t pid;
fp=fopen("..........");
// now i am transfering the control to a new process(p2.c).
pid=fork();
if(pid==0)
.....
execl(" p2".....);
....
... (6 Replies)
Discussion started by: bankpro
6 Replies
3. Shell Programming and Scripting
Hi,
I was using mpack to send mails using cronjob with attachments. It was working perfect. But recently it's behaving strangely. Its sending the mails without any error message but the mail is not getting delivered.
The code I was using:
/usr/local/bin/mpack -s "$SUBJECT" -d $MSGBODY... (0 Replies)
Discussion started by: itesh.dash
0 Replies
4. AIX
$cat /tmp/tuxob.lst
udi *****
jim 10
ant 19
ibm *****
$ input=`head -1 /tmp/tuxob.lst | awk '{print $NF}'`
$ echo $input
The output I am expecting is '*****'. But It is showing me the available files of current directory. When I run the command
head -1 /tmp/tuxob.lst | awk '{print $NF} ... (3 Replies)
Discussion started by: panchpan
3 Replies
5. Shell Programming and Scripting
I notice that su - user (note with dash) brings in more of the user's environment than does su - user -c 'command'. For example, if root does an su - user, and types "umask" to the prompt, one umask is displayed; yet, if instead the command is su - user -c 'umask', the value is different. I thought... (2 Replies)
Discussion started by: drokerm
2 Replies
6. Shell Programming and Scripting
Hi,
i have script called script.ksh
script.ksh
---------
echo "Narayana" >$HOME/script.log
echo "$0" |sed 's/.ksh//' >>$HOME/script.log
My question is:
--------------
when iam executing on the prompt it is giving good results what we have expected...
example on the prompt:... (4 Replies)
Discussion started by: lnviyyapu
4 Replies
7. Linux
Hi,
I have a question on web servers and network switches.
Why a network switch should support certificate management, that means generating public and private keys... installing a certificate etcetra.
Regards
Chaitanya. :b: (4 Replies)
Discussion started by: chaitus.28
4 Replies
8. UNIX for Dummies Questions & Answers
In my old shop, we only had AIX machines there (all of version 6.1 ). FTP ports were not open for these AIX machines because of some security thing. So, we can't ftp scripts in ASCII mode.
When we wanted to copy huge scripts (shell scripts, sql scripts , ..etc) from our Windows based laptop... (6 Replies)
Discussion started by: kraljic
6 Replies
9. Shell Programming and Scripting
Hello
I want to check whether certain arguments were passed to the script, and when those are, not doing a log entry.
If those arguments are not passed, always do a log entry (*new call*).
What currently i have is this:
echo "${@}"|grep -q \\- || \
tui-log -e "$LOG" "\r---- New call $$... (4 Replies)
Discussion started by: sea
4 Replies
10. UNIX for Beginners Questions & Answers
Our application fails to run successfully on Solaris 11. The same works fine in Solaris 10.
Due to which we are unable to migrate to Solaris 11. The app basically involves forking a child process, which finally connects with parent process. But on Solaris 11, it is unable to connect with parent... (0 Replies)
Discussion started by: wini008
0 Replies
lindex(n) Tcl Built-In Commands lindex(n)
__________________________________________________________________________________________________________________________________________________
NAME
lindex - Retrieve an element from a list
SYNOPSIS
lindex list ?index...?
_________________________________________________________________
DESCRIPTION
The lindex command accepts a parameter, list, which it treats as a Tcl list. It also accepts zero or more indices into the list. The
indices may be presented either consecutively on the command line, or grouped in a Tcl list and presented as a single argument.
If no indices are presented, the command takes the form:
lindex list
or
lindex list {}
In this case, the return value of lindex is simply the value of the list parameter.
When presented with a single index, the lindex command treats list as a Tcl list and returns the index'th element from it (0 refers to the
first element of the list). In extracting the element, lindex observes the same rules concerning braces and quotes and backslashes as the
Tcl command interpreter; however, variable substitution and command substitution do not occur. If index is negative or greater than or
equal to the number of elements in value, then an empty string is returned. The interpretation of each simple index value is the same as |
for the command string index, supporting simple index arithmetic and indices relative to the end of the list.
If additional index arguments are supplied, then each argument is used in turn to select an element from the previous indexing operation,
allowing the script to select elements from sublists. The command,
lindex $a 1 2 3
or
lindex $a {1 2 3}
is synonymous with
lindex [lindex [lindex $a 1] 2] 3
EXAMPLES
lindex {a b c}
-> a b c
lindex {a b c} {}
-> a b c
lindex {a b c} 0
-> a
lindex {a b c} 2
-> c
lindex {a b c} end
-> c
lindex {a b c} end-1
-> b
lindex {{a b c} {d e f} {g h i}} 2 1
-> h
lindex {{a b c} {d e f} {g h i}} {2 1}
-> h
lindex {{{a b} {c d}} {{e f} {g h}}} 1 1 0
-> g
lindex {{{a b} {c d}} {{e f} {g h}}} {1 1 0}
-> g
SEE ALSO
list(n), lappend(n), linsert(n), llength(n), lsearch(n), lset(n), lsort(n), lrange(n), lreplace(n), string(n) |
KEYWORDS
element, index, list
Tcl 8.4 lindex(n)