Sponsored Content
Top Forums Shell Programming and Scripting Fixed width file search based on position value Post 302776899 by RudiC on Thursday 7th of March 2013 05:14:25 AM
Old 03-07-2013
The position of "xg" is 9-10 despite the phrasing in the spec. Try
Code:
$ grep -E "^.{8}xg" file
abcd1234xgyhsyshijfkfk

or
Code:
$ sed -En "/^.{8}xg/p" file
abcd1234xgyhsyshijfkfk

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Append line based on fixed position

Hi all; I'm having headache on append one line to another based on the fix position.Hope u guys can help. All i need to do is append the line that start with '3' to a line which start with '1' and the position for line 3 that i need to append is 22. The original file look like this: ... (2 Replies)
Discussion started by: ashikin_8119
2 Replies

2. Shell Programming and Scripting

row to column and position data in to fixed column width

Dear friends, Below is my program and current output. I wish to have 3 or 4 column output in order to accomodate in single page. i do have subsequent command to process after user enter the number. Program COUNT=1 for MYDIR in `ls /` do VOBS=${MYDIR} echo "${COUNT}. ${MYDIR}" ... (4 Replies)
Discussion started by: baluchen
4 Replies

3. UNIX for Dummies Questions & Answers

Remove duplicates based on a column in fixed width file

Hi, How to output the duplicate record to another file. We say the record is duplicate based on a column whose position is from 2 and its length is 11 characters. The file is a fixed width file. ex of Record: DTYU12333567opert tjhi kkklTRG9012 The data in bold is the key on which... (1 Reply)
Discussion started by: Qwerty123
1 Replies

4. Shell Programming and Scripting

How to split a fixed width text file into several ones based on a column value?

Hi, I have a fixed width text file without any header row. One of the columns contains a date in YYYYMMDD format. If the original file contains 3 dates, I want my shell script to split the file into 3 small files with data for each date. I am a newbie and need help doing this. (14 Replies)
Discussion started by: bhanja_trinanja
14 Replies

5. UNIX for Dummies Questions & Answers

Length of a fixed width file

I have a fixed width file of length 53. when is try to get the lengh of the record of that file i get 2 different answers. awk '{print length;exit}' <File_name> The above code gives me length 50. wc -L <File_name> The above code gives me length 53. Please clarify on... (2 Replies)
Discussion started by: Amrutha24
2 Replies

6. Shell Programming and Scripting

Splitting based on occurence of a Character at fixed position

I have a requirement where i need to split a file based on occurence of a character which is present at a fixed position. Description is as below: 1. The file will be more than 1 Lakh records. 2. Each line will be of fixed length of 987 characters. 3. At position 28 in each line either 'C' or... (9 Replies)
Discussion started by: Neelkanth
9 Replies

7. Shell Programming and Scripting

Search for a string at a particular position and replace with blank based on position

Hi, I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)
Discussion started by: Pradhikshan
9 Replies

8. Shell Programming and Scripting

UNIX command -Filter rows in fixed width file based on column values

Hi All, I am trying to select the rows in a fixed width file based on values in the columns. I want to select only the rows if column position 3-4 has the value AB I am using cut command to get the column values. Is it possible to check if cut -c3-4 = AB is true then select only that... (2 Replies)
Discussion started by: ashok.k
2 Replies

9. Shell Programming and Scripting

Search and replace value based on certain conditions in a fixed width file

Hi Forum. I tried searching for a solution using the internet search but I haven't been able to find any solution for what I'm trying to accomplish. I have a fixed width column file where I need to search for any occurrences of "D0" in col pos.#1-2, 10-11, 20-21 and replaced it with "XD". ... (2 Replies)
Discussion started by: pchang
2 Replies
ttk_image(3tk)							 Tk Themed Widget						    ttk_image(3tk)

__________________________________________________________________________________________________________________________________________________

NAME
ttk_image - Define an element based on an image SYNOPSIS
ttk::style element create name image imageSpec ?options? _________________________________________________________________ DESCRIPTION
The image element factory creates a new element in the current theme whose visual appearance is determined by Tk images. imageSpec is a list of one or more elements. The first element is the default image name. The rest of the list is a sequence of statespec / value pairs specifying other images to use when the element is in a particular state or combination of states. OPTIONS
Valid options are: -border padding padding is a list of up to four integers, specifying the left, top, right, and bottom borders, respectively. See IMAGE STRETCHING, below. -height height Specifies a minimum height for the element. If less than zero, the base image's height is used as a default. -padding padding Specifies the element's interior padding. Defaults to -border if not specified. -sticky spec Specifies how the image is placed within the final parcel. spec contains zero or more characters "n", "s", "w", or "e". -width width Specifies a minimum width for the element. If less than zero, the base image's width is used as a default. IMAGE STRETCHING
If the element's allocated parcel is larger than the image, the image will be placed in the parcel based on the -sticky option. If the image needs to stretch horizontally (i.e., -sticky ew) or vertically (-sticky ns), subregions of the image are replicated to fill the par- cel based on the -border option. The -border divides the image into 9 regions: four fixed corners, top and left edges (which may be tiled horizontally), left and right edges (which may be tiled vertically), and the central area (which may be tiled in both directions). EXAMPLE
set img1 [image create photo -file button.png] set img2 [image create photo -file button-pressed.png] set img3 [image create photo -file button-active.png] style element create Button.button image [list $img1 pressed $img2 active $img3] -border {2 4} -sticky we SEE ALSO
ttk::intro(3tk), ttk::style(3tk), ttk_vsapi(3tk), image(3tk), photo(3tk) KEYWORDS
style, theme, appearance, pixmap theme, image Tk 8.5 ttk_image(3tk)
All times are GMT -4. The time now is 11:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy