02-12-2008
you can try to parse the contents of the file and compare the lines you are reading, maybey something like this (will require some polishing):
open(FH, $filename);
while (<FH>) {
print $_ if ($_ =~ / /);
}
in other words, will print the line if it contains a space, but it may be not what you are requiring, for that some more info may come in handy..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there
I have a file with a variable amount of rows but the 45th, 46th and 47th charachter of each line is the status field which is a three digit code ie 001, 002, 003 etc. My question is this..I need to strip all the records/lines with 002's out of the file completely and put them into... (14 Replies)
Discussion started by: hcclnoodles
14 Replies
2. Shell Programming and Scripting
When restoring a file in my uninstall program I need to remove the lines I added to a file during the install. In between the file can be modified by the users.
Assume file1 is as follow:
xxx str2 xxxx
.....
...The Following lines containing str* have to be removed...
xxx str1 xxxx
xxx ... (17 Replies)
Discussion started by: bluemoon1
17 Replies
3. Shell Programming and Scripting
Can anyone tell me what could be the solution to following :
I have one .txt file which contains some seed information. This seed may appear multiple time in the file so what I want do is if this seed appears again in the file then that line should be removed.
here is the contents of .txt... (5 Replies)
Discussion started by: dipakg
5 Replies
4. Shell Programming and Scripting
Can anyone tell me what could be the solution to following :
I have one .txt file which contains some "seed" information. This seed may appear multiple time in the file so what I want do is if this seed appears again in the file then that line should be removed.
Please provide the script code... (4 Replies)
Discussion started by: dipakg
4 Replies
5. Shell Programming and Scripting
Hello,
I've to change the shell in /etc/passwd for some users .
I've the list of users but I'm not able to modify the file with scripting .
I'm working on a Sol10 .
Can anyone help me ?
tnks (7 Replies)
Discussion started by: gogol_bordello
7 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I want to remove the first line from a flat file using unix command as simple as possible. Can anybody give me a hand ?
Thanks in advance.
xli (21 Replies)
Discussion started by: xli
21 Replies
7. UNIX for Dummies Questions & Answers
I am on AIX Unix. I want to read a flat file for a string in a certain byte. I want to find the value: 943034 in column 56; and write out just those records to another file. Also, could I get the line/record number of where it was found in the input file?
Thank you,
sboxtops (1 Reply)
Discussion started by: sboxtops
1 Replies
8. Shell Programming and Scripting
I have a flat file that contains records similar to the following two lines;
1984/11/08 7 700000 123456789 2
1984/11/08 1941/05/19 7 700000 123456789 2
The 123456789 2 represents an account number, this is how I identify the duplicate record.
The ### signs represent... (4 Replies)
Discussion started by: jolney
4 Replies
9. UNIX for Advanced & Expert Users
Hi all,
I have a issues while loading a flat file to the DB. It is taking much time.
When analyzed i found out that there are duplicates entry in the flat file.
There are 2 type of Duplicate entry.
1) is entire row is duplicate. ( i can use sort | uniq) to remove the duplicated entry.
2) the... (4 Replies)
Discussion started by: samjoshuab
4 Replies
10. Shell Programming and Scripting
I am trying to remove lines in the target.txt file if $5 before the - in that file matches sorted_list. I have tried grep and awk. Thank you :).
grep
grep -v -F -f targets.bed sort_list
grep -vFf sort_list targets
awk
awk -F, '
> FILENAME == ARGV {to_remove=1; next}
> ! ($5 in... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT OSX
ttk::label
ttk::label(n) Tk Themed Widget ttk::label(n)
__________________________________________________________________________________________________________________________________________________
NAME
ttk::label - Display a text string and/or image
SYNOPSIS
ttk::label pathName ?options?
_________________________________________________________________
DESCRIPTION
A ttk::label widget displays a textual label and/or image. The label may be linked to a Tcl variable to automatically change the displayed
text.
STANDARD OPTIONS
-class -compound -cursor
-image -style -takefocus
-text -textvariable -underline
-width
See the ttk_widget manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
[-anchor anchor] Specifies how the information in the widget is positioned relative to the inner margins. Legal values are n, ne, e, se,
s, sw, w, nw, and center. See also -justify. [-background frameColor] The widget's background color. If unspecified, the theme default
is used. [-font font] Font to use for label text. [-foreground textColor] The widget's foreground color. If unspecified, the theme
default is used. [-justify justify] If there are multiple lines of text, specifies how the lines are laid out relative to one another.
One of left, center, or right. See also -anchor. [-padding padding] Specifies the amount of extra space to allocate for the widget. The
padding is a list of up to four length specifications left top right bottom. If fewer than four elements are specified, bottom defaults to
top, right defaults to left, and top defaults to left. [-relief relief] Specifies the 3-D effect desired for the widget border. Valid
values are flat, groove, raised, ridge, solid, and sunken. [-text text] Specifies a text string to be displayed inside the widget (unless
overridden by -textvariable). [-wraplength wrapLength] Specifies the maximum line length (in pixels). If this option is less than or
equal to zero, then automatic wrapping is not performed; otherwise the text is split into lines such that no line is longer than the speci-
fied value.
WIDGET COMMAND
Supports the standard widget commands configure, cget, identify, instate, and state; see ttk::widget(n).
SEE ALSO
ttk::widget(n), label(n)
Tk 8.5 ttk::label(n)