Hi there,
I have a comma seperated file with nine fields
the fields are
rerate: "numberTX",field2,field3,field4,field5.....
I want to do this to the file
reate: "field5TX",field2,field3,field4,field5
I know I can do this using AWK, but the thing giving me fits is that I... (5 Replies)
hi everybody
i would to select the last field of a file
here as you can see i select the field number 8
y=`cat sortie2 | grep "^"| grep "starting"| awk '{ print $8}'`
but line can containt more or less field in never know, i just know is the last one
so i wondering to know if is... (3 Replies)
Hi all,
I am learning the use of regular expression and I would like to know which regex can be used to select only the last part of a directory path name.
Something like:
/dir1/dir2/dir2
and I want to select the last /dir2 where dir2 can be any kind of string.
Thanks a lot for your help.... (7 Replies)
Please help. I am adding 2 fields which are both positive and the result is negative. What am I missing?
FileEHash=`expr ${Field1} + ${Field2}` >/dev/null
Debug Results
+ expr 02100002 + 2009701914
EntryHash=2011801916
+ expr 02100002 + 2146202044
FileEHash=-2146665250
How do... (2 Replies)
I've made a habit of including a four-letter "tail" on image file names I download from the Web, so I can both match them with IPTC Transmission References of my own making and rename them later using either a GUI renamer or a script I've written myself. Now I want to automate the process of... (2 Replies)
Hi all,
I have a string that looks like:
#!/bin/sh
options="arguments: --user=alpha --group=beta --prefix=/usr/share --proxy-path=/proxy --proxy-tmp=/tmp --conf-path=/etc"
My goal is to transform the string into an array, then for each key, if it starts with "--proxy" to print the string... (2 Replies)
Dear community, I have a very simple query (on Oracle 11g) to select 3 fields:
select field1, field2, field3, count(*) from table
where...
group by field1, field2, field3
having count(*) > 10;Now, what I need, is exclude "field3" from the "group by" since I only need field 1 and 2 to be... (2 Replies)
Hi,
I saw your post..
I have a dought in awk command...
how to get the output from a file. i need a first column in etc/passwd file in a single column (in indivijual line)...
i couldn't get with this command
cat /etc/passwd | awk -F ":" '{printf $1}'
Kindly help
This thread was created... (3 Replies)
Hi All,
We've a VDI infrastructure in AWS (AWS workspaces) and we're planning to automate the process of provisioning workspaces. Instead of going to GUI console, and launching workspaces by selecting individual users is little time consuming. Thus, I want to create them in bunches from AWS CLI... (6 Replies)
Discussion started by: arun_adm
6 Replies
LEARN ABOUT OSX
lrange
lrange(n) Tcl Built-In Commands lrange(n)
__________________________________________________________________________________________________________________________________________________NAME
lrange - Return one or more adjacent elements from a list
SYNOPSIS
lrange list first last
_________________________________________________________________DESCRIPTION
List must be a valid Tcl list. This command will return a new list consisting of elements first through last, inclusive. The index values |
first and last are interpreted the same as index values for the command string index, supporting simple index arithmetic and indices rela- |
tive to the end of the list. If first is less than zero, it is treated as if it were zero. If last is greater than or equal to the number
of elements in the list, then it is treated as if it were end. If first is greater than last then an empty string is returned. Note:
"lrange list first first" does not always produce the same result as "lindex list first" (although it often does for simple fields that are
not enclosed in braces); it does, however, produce exactly the same results as "list [lindex list first]"
EXAMPLES
Selecting the first two elements:
% lrange {a b c d e} 0 1
a b
Selecting the last three elements:
% lrange {a b c d e} end-2 end
c d e
Selecting everything except the first and last element:
% lrange {a b c d e} 1 end-1
b c d
Selecting a single element with lrange is not the same as doing so with lindex:
% set var {some {elements to} select}
some {elements to} select
% lindex $var 1
elements to
% lrange $var 1 1
{elements to}
SEE ALSO
list(n), lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), lset(n), lreplace(n), lsort(n), string(n) |
KEYWORDS
element, list, range, sublist
Tcl 7.4 lrange(n)