How about the "Substring Parameter Expansion" (possibly not available in all POSIX compliant shells):
man bash:
Quote:
${parameterffset}...
If offset evaluates to a number less than zero, the value is used as an offset in characters from the end of the value of parameter.
Hi all,
Does anyone know how to ammend the .cshrc file in $HOME for your session to display the path as part of the command line? So that I dont need to keep on typing pwd to see where I am?
thanks
Ocelot (3 Replies)
Hello everbody:
another dummy question.
I have SOL9, is there any command I can get the part number of the installed memory kit on the system, I tried prtdiag but it doesnt display that.
Thanks alot (0 Replies)
hi
i am pretty new to unix .i am ETL guy
I need a unix script to take row count of a file and write it to another file
the problem with wc-l is it include filename also
wc -l abc.dat
will give me like 1000 abc.dat
i just want 1000 to be written
can u just take 2 min to write a simple... (1 Reply)
I have a four part number
eg: 1.21.1.3
I need to find a way in shell script to decrement this by one and put in a loop
so the values printed will be
1.21.1.2
1.21.1.1
1.21.1.0
Which is the best way to do this in shell script?? (7 Replies)
Hi
i am accessing the server remotly. i want to replace bad dvd writer. how do i know the part number of the dvd drive for raising a spare.
thanks (3 Replies)
I have to extract number part (Date and timestamp part ) from the following 3 strings
AB_XYZA_20130930183017.log
AB_DY_XYZA_20130930183017.log
AB_GZU_20130930183017.log
Output should be
20130930183017
Please help me to get the string like above
Thanks (2 Replies)
hii master Unix
I finish find to google how to command for the show part number and asset number at a IBM P series and i notyet finded.
maybe all master unix can help me about what the command part number and asset number at server IBM P series.
regards,
amin (1 Reply)
Hi experts,
I am using KSH and I am need to display file with number in front of file names and user can select it by entering the number.
I am trying to use following command to display list with numbers. but I do not know how to capture number and identify what file it is to be used for... (5 Replies)
Discussion started by: mysocks
5 Replies
LEARN ABOUT REDHAT
seek
seek(n) Tcl Built-In Commands seek(n)
__________________________________________________________________________________________________________________________________________________NAME
seek - Change the access position for an open channel
SYNOPSIS
seek channelId offset ?origin?
_________________________________________________________________DESCRIPTION
Changes the current access position for channelId. ChannelId must be a channel identifier such as returned from a previous invocation of
open or socket. The offset and origin arguments specify the position at which the next read or write will occur for channelId. Offset must
be an integer (which may be negative) and origin must be one of the following:
start The new access position will be offset bytes from the start of the underlying file or device.
current The new access position will be offset bytes from the current access position; a negative offset moves the access position back-
wards in the underlying file or device.
end The new access position will be offset bytes from the end of the file or device. A negative offset places the access position
before the end of file, and a positive offset places the access position after the end of file.
The origin argument defaults to start.
The command flushes all buffered output for the channel before the command returns, even if the channel is in nonblocking mode. It also
discards any buffered and unread input. This command returns an empty string. An error occurs if this command is applied to channels
whose underlying file or device does not support seeking.
Note that offset values are byte offsets, not character offsets. Both seek and tell operate in terms of bytes, not characters, unlike |
read.
SEE ALSO
file(n), open(n), close(n), gets(n), tell(n)
KEYWORDS
access position, file, seek
Tcl 8.1 seek(n)