01-05-2012
You Sir, are awesome. 1000 internets to you.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am writing a script to search PCL output and append more PCL data to the end accordingly.
I need to remove the last 88 bytes from the string.
I have searched for a few hours now and am coming up with nothing. I can't use head or tail because the PCL output is all on one line. awk crashes on... (3 Replies)
Discussion started by: craig2k
3 Replies
2. Shell Programming and Scripting
Hi,
I have file as shown below.
abc,
def,
abc,
xyz,
I have to remove ',' from end of last line (xyz,). How can I do that with single command? Is it possible or I have to iterate through complete file to remove that?
- Malay (2 Replies)
Discussion started by: malaymaru
2 Replies
3. Shell Programming and Scripting
I've got a file that would have lines similar to:
12345678 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
23456781 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
34567812 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
45678123 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 xx.00... (10 Replies)
Discussion started by: Cailet
10 Replies
4. Shell Programming and Scripting
I have a file with varying record length in it. I need to reformat this file so that each line will have a length of 100 characters (99 characters + the line feed).
AU * A01 EXPENSE 6990370000 CWF SUBC TRAVEL & MISC
MY * A02 RESALE 6990788000 Y... (3 Replies)
Discussion started by: udelalv
3 Replies
5. UNIX for Dummies Questions & Answers
Hello Friends, How can I remove the last two values of this line using sed
John Carey:507-699-5368:29 Albert way, Edmonton, AL 25638:9/3/90:45900
The result should look like this:
John Carey:507-699-5368:29 Albert way, Edmonton, AL 25638 (3 Replies)
Discussion started by: humkhn
3 Replies
6. Shell Programming and Scripting
All:
Can somebody help me out with a sed command, which removes the the first occurance of ')' until the end of the line
If I have the following input
... (5 Replies)
Discussion started by: BeefStu
5 Replies
7. Shell Programming and Scripting
Hi all,
using VI, can anyone tell me how to add some characters onto the end of a line where the line begins with certain charactars eg
a,b,c,.......,
r,s,t,........,
a,b,c,.......,
all lines in the above example starting with a,b,c, I want to add an x at the end of the line so the... (6 Replies)
Discussion started by: satnamx
6 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I have records like below that I want to remove any five characters from the end of the string before the double quotes unless it is only an asterik.
3919,5020 ,04/17/2012,0000000000006601.43,,0000000000000000.00,, 132, 251219,"*"
1668,0125 ... (2 Replies)
Discussion started by: jyoung
2 Replies
9. UNIX for Dummies Questions & Answers
How can I specify special meaning characters like ^ or $ inside a regex range. e.g
Suppose I want to search for a string that either starts with '|' character or begins with start-of-line character.
I tried the following but it does not work:
sed 's/\(\)/<do something here>/g' file1
... (3 Replies)
Discussion started by: jawsnnn
3 Replies
10. Shell Programming and Scripting
Hello.
The token is any printable characters between 2 " .
The token is unknown, but we know that it is between 2 "
Tok 1 : "1234x567"
Tok 2 : "A3b6+None"
Tok 3 : "A3b6!1234=@"
The ligne is :
Line 1 :
"9876xABCDE"Do you have any code fragments or data samples in your post
Line 2 : ... (3 Replies)
Discussion started by: jcdole
3 Replies
gets(n) Tcl Built-In Commands gets(n)
__________________________________________________________________________________________________________________________________________________
NAME
gets - Read a line from a channel
SYNOPSIS
gets channelId ?varName?
_________________________________________________________________
DESCRIPTION
This command reads the next line from channelId, returns everything in the line up to (but not including) the end-of-line character(s), and
discards the end-of-line character(s). If varName is omitted the line is returned as the result of the command. If varName is specified
then the line is placed in the variable by that name and the return value is a count of the number of characters returned.
If end of file occurs while scanning for an end of line, the command returns whatever input is available up to the end of file. If chan-
nelId is in nonblocking mode and there is not a full line of input available, the command returns an empty string and does not consume any
input. If varName is specified and an empty string is returned in varName because of end-of-file or because of insufficient data in non-
blocking mode, then the return count is -1. Note that if varName is not specified then the end-of-file and no-full-line-available cases
can produce the same results as if there were an input line consisting only of the end-of-line character(s). The eof and fblocked commands
can be used to distinguish these three cases.
SEE ALSO
file(n), eof(n), fblocked(n)
KEYWORDS
blocking, channel, end of file, end of line, line, nonblocking, read
Tcl 7.5 gets(n)