10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
All- We have a performance issue in reading a file line by line. Please find attached scripts for the same. Currently it is taking some 45 min to parse "512444" lines.
Could you please have a look at it and provide any suggestions to improve the performance.
Thanks,
Balu
... (12 Replies)
Discussion started by: balu1729
12 Replies
2. UNIX for Beginners Questions & Answers
Hi All- we have performance issue in unix to read line by line.
I am looking at processing all the records.
description: Our script will read data from a flat file, it will pickup first four character and based on the value it will set up variables accordingly and appended the final output to... (11 Replies)
Discussion started by: balu1729
11 Replies
3. Shell Programming and Scripting
Heyas
I'm trying to read/display a file its content and put borders around it (tui-cat / tui-cat -t(ypwriter).
The typewriter-part is a 'bonus' but still has its own flaws, but thats for later.
So in some way, i'm trying to rewrite cat using bash and other commands.
But sadly it fails on... (2 Replies)
Discussion started by: sea
2 Replies
4. Shell Programming and Scripting
Hi,
This is the script and the error I am receiving
Can anyone please suggest ?
For the exmaple below assume we are using vg01
#!/bin/ksh
echo "##### Max Mount Count Fixer #####"
echo "Please insert Volume Group name to check"
read VG
lvs |grep $VG | awk {'print $1'} > /tmp/audit.log
... (2 Replies)
Discussion started by: galuzan
2 Replies
5. Shell Programming and Scripting
Hi,
I'm trying to run the following command using sh -c
ie
sh -c "while read EachLine
do
rm -f $EachLine ;
done < file_list.lst;"
It doesn't seem to do anything.
When I run this at the command line, it does remove the files contained in the list so i know the command works
ie... (4 Replies)
Discussion started by: chrispward
4 Replies
6. Shell Programming and Scripting
Hi
I am using while loop, below, to read lines from a very large file, around 400,000 rows. The script works fine until around line 300k but then starts giving incorrect result.
I have tried running the script with a smaller data set and it works fine. I made sure to include the line where... (2 Replies)
Discussion started by: saurabhkumar198
2 Replies
7. Shell Programming and Scripting
I am using the while-loop to read a file.
The file has lines with null-terminated strings (words, actually.)
What I have by that reading - just a first word up to '\0'!
I need to have whole string up to 'new line' - (LF, 10#10, 16#A)
What I am doing wrong?
#make file 'grb' with... (6 Replies)
Discussion started by: alex_5161
6 Replies
8. Shell Programming and Scripting
Hi,
Could someone has any suggestions on this? When read a line from a file, I need to check the first char in the line, it could be a space or any char. But the leading spaces are removed by read.
Thanks. (2 Replies)
Discussion started by: momi
2 Replies
9. Shell Programming and Scripting
Hi friends
I need some help,
I have a file which looks as follows
TEMP 014637065 014637065 517502 517502 RTE
517502 517502 RTE
AWATER_TEST 12325 23563 588323 2323 5656 32385 23235635
ANOTHER_TEST 12 5433 FTHH 5653 833
TEST 123 123 3235 5353 353 53 35 353 535 3
YTERS GJK JKLS
... (6 Replies)
Discussion started by: lijojoseph
6 Replies
10. Shell Programming and Scripting
Hi all,
I've been trying to get this to work for ages to no avail. I've searched this site and googled but cannot find a satisfactory answer.
I've got a while loop, like this
while read line
do
echo "$line"
done < file_name
Now, my problem is that most of the lines in the file... (3 Replies)
Discussion started by: zazzybob
3 Replies
Tk_GetDash(3) Tk Library Procedures Tk_GetDash(3)
__________________________________________________________________________________________________________________________________________________
NAME
Tk_GetDash - convert from string to valid dash structure.
SYNOPSIS
#include <tk.h>
int
Tk_GetDash(interp, string, dashPtr)
ARGUMENTS
Tcl_Interp *interp (in) Interpreter to use for error reporting.
const char * string (in) Textual value to be converted.
Tk_Dash *dashPtr (out) Points to place to store the dash pattern value converted from string.
_________________________________________________________________
DESCRIPTION
These procedure parses the string and fills in the result in the Tk_Dash structure. The string can be a list of integers or a character
string containing only ".,-_" or spaces. If all goes well, TCL_OK is returned. If string does not have the proper syntax then TCL_ERROR is
returned, an error message is left in the interpreter's result, and nothing is stored at *dashPtr.
The first possible syntax is a list of integers. Each element represents the number of pixels of a line segment. Only the odd segments are
drawn using the "outline" color. The other segments are drawn transparent.
The second possible syntax is a character list containing only 5 possible characters ".,-_ ". The space can be used to enlarge the space
between other line elements, and can not occur as the first position in the string. Some examples:
-dash . = -dash {2 4}
-dash - = -dash {6 4}
-dash -. = -dash {6 4 2 4}
-dash -.. = -dash {6 4 2 4 2 4}
-dash {. } = -dash {2 8}
-dash , = -dash {4 4}
The main difference of this syntax with the previous is that it is shape-conserving. This means that all values in the dash list will be
multiplied by the line width before display. This assures that "." will always be displayed as a dot and "-" always as a dash regardless
of the line width.
On systems where only a limited set of dash patterns, the dash pattern will be displayed as the most close dash pattern that is available.
For example, on Windows only the first 4 of the above examples are available. The last 2 examples will be displayed identically as the
first one.
KEYWORDS
dash, conversion
Tk 8.3 Tk_GetDash(3)