Sponsored Content
Full Discussion: sed or awk editing help
Top Forums Shell Programming and Scripting sed or awk editing help Post 302468414 by DGPickett on Tuesday 2nd of November 2010 04:21:13 PM
Old 11-02-2010
Hey, I love mmap(), and mmap64() more, a golden door into unlimited VM and RAM use and random access to application data. But sed is all about the (expandable) microcosm of two lines. The early small buffer sed activity fit in the small L1 caches of earlier days. I rarely nit pick below the bit level -- the pixel, maybe, but not the bit! It is about seeing all the choices, weighing all the choices, and making informed choices, investing in knowing the right technique for the next time, investing in yourself, investing in your new friends.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Editing File using awk/sed

Hello Awk Gurus, Can anyone of you help me with the below problem. I have got a file having data in below format pmFaultyTransportBlocks ----------------------- 9842993 pmFrmNoOfDiscRachFrames ----------------------- NULL pmNoRecRandomAccSuccess -----------------------... (4 Replies)
Discussion started by: Mohammed
4 Replies

2. Shell Programming and Scripting

Editing Commas in a textfile using sed

Hi guys task removing the last commas of 5th and 6th columns. The bug in the script is causing effect because of whitespaces around commas. I tried to delete white spaces first and running the above script. but still some where getting the results wrong. I already have a script to do this... (12 Replies)
Discussion started by: repinementer
12 Replies

3. Homework & Coursework Questions

String editing using sed? awk?

1. The problem statement, all variables and given/known data: Problem Statement for project: When an account is created on the CS Unix network, a public html directory is created in the account's home directory. A default web page is put into that directory. Some users replace or... (13 Replies)
Discussion started by: peage1475
13 Replies

4. Shell Programming and Scripting

problem in using sed command in editing a file

Hi all, I have a conf file, i want to update some entries in that conf file. Below is the code for that using a temporary file. sed '/workgroup=/ c\workgroup=Workgroup' /usr/local/netx.conf > /usr/local/netx.conf.tmp mv -f /usr/local/netx.conf.tmp /usr/local/netx.conf Sample contents of... (9 Replies)
Discussion started by: ranj14r
9 Replies

5. Shell Programming and Scripting

Comparison and editing of files using awk.(And also a possible bug in awk for loop?)

I have two files which I would like to compare and then manipulate in a way. File1: pictures.txt 1.1 1.3 dance.txt 1.2 1.4 treehouse.txt 1.3 1.5 File2: pictures.txt 1.5 ref2313 1.4 ref2345 1.3 ref5432 1.2 ref4244 dance.txt 1.6 ref2342 1.5 ref2352 1.4 ref0695 1.3 ref5738 1.2... (1 Reply)
Discussion started by: linuxkid
1 Replies

6. Shell Programming and Scripting

Line/Variable Editing for Awk sed Cut

Hello, i have a file, i open the file and read the line, i want to get the first item in the csv file and also teh third+6 item and wirte it to a new csv file. only problem is that using echo it takes TOO LONG: please help a newbie. below is my code: WorkingDir=$1 FileName=`cut -d ',' -f... (2 Replies)
Discussion started by: limamichelle
2 Replies

7. UNIX for Dummies Questions & Answers

sed editing help....

Hello all, I need some help with sed. seems like i cant get through it. So here is what i am trying. when i do ps -ef|grep bla blah ...like below...i get /u01/app/oracle/11g/bin/tnslsnr .... but i want to replace that string with something using sed. So basically i want to get rid of... (3 Replies)
Discussion started by: abdul.irfan2
3 Replies

8. UNIX for Dummies Questions & Answers

sed help finding and editing

With sed 1. I need to find a line that contains "DVM" and "73069". 2. I need to insert a double quote at the beginning of the first line of the file. These two have been driving me crazy for the last 45 minutes. Any help would be greatly appreciated. Thanks (3 Replies)
Discussion started by: nlassiter
3 Replies

9. Shell Programming and Scripting

editing file with awk cut and sed

HI All, I am new to unix. I have a file would like to do some editing by using awk, cut and sed. Could anyone help? This file contain 100 lines. There are one line for example: 2,"102343454",5060,"579668","579668","579668","SIP",,,"825922","035885221283026",1,268,"00:59:00.782 APR 17... (2 Replies)
Discussion started by: mimilaw
2 Replies

10. Shell Programming and Scripting

Editing files with sed or something similar

{ "AFafa": "FAFA","AFafa": "FAFA" "baseball":"soccer","wrestling":"dancing" "rhinos":"crocodiles","roles":"foodchain" } I need to insert a new line before the closing brackets "}" so that the final output looks like this: { "AFafa": "FAFA","AFafa": "FAFA"... (6 Replies)
Discussion started by: SkySmart
6 Replies
BrowseEntry(3)						User Contributed Perl Documentation					    BrowseEntry(3)

NAME
Tk::BrowseEntry - entry widget with popup choices. SYNOPSIS
use Tk::BrowseEntry; $b = $frame->BrowseEntry(-label => "Label", -variable => $var); $b->insert("end", "opt1"); $b->insert("end", "opt2"); $b->insert("end", "opt3"); ... $b->pack; SUPER-CLASS The "BrowseEntry" class is derived from the "Frame" class and inherits all the methods, options and subwidgets of its super-class. By default, options and methods are delegated to the entry subwidget. DESCRIPTION
BrowseEntry is a poor man's ComboBox. It may be considered an enhanced version of LabEntry which provides a button to popup the choices of the possible values that the Entry may take. BrowseEntry supports all the options LabEntry supports except -textvariable. This is replaced by -variable. Other options that BrowseEntry supports: -arrowimage Specifies the image to be used in the arrow button beside the entry widget. The default is an downward arrow image in the file cbxarrow.xbm -autolimitheight If set to a true value, then the height of the listbox will be at most the number of entries in the list. The overall maximum of "-listheight" still applies. -autolistwidth If set to a true value, then the width of the listbox will match the width of the largest entry. -browsecmd Specifies a function to call when a selection is made in the popped up listbox. It is passed the widget and the text of the entry selected. This function is called after the entry variable has been assigned the value. -browse2cmd Like "-browsecmd", but the callback is called with the listbox index instead of the selected value. -buttontakefocus Set the "-takefocus" option of the button subwidget. -choices Specifies the list of choices to pop up. This is a reference to an array of strings specifying the choices. -colorstate The state of the widget is reflected by color. A non-editable entry widget will get a light gray background, while an editable entry will be almost white. [This may change] -listcmd Specifies the function to call when the button next to the entry is pressed to popup the choices in the listbox. This is called before popping up the listbox, so can be used to populate the entries in the listbox. -listheight Set the height of the listbox. See also "-autolimitheight". -listwidth Specifies the width of the popup listbox. -state Specifies one of three states for the widget: normal, readonly, or disabled. If the widget is disabled then the value may not be changed and the arrow button won't activate. If the widget is readonly, the entry may not be edited, but it may be changed by choosing a value from the popup listbox. normal is the default. -style Set the "style" of the widget. Permitted values are "MSWin32" and "unix". By default "-style" is set to the current platform. Widgets with the "unix" style will look like a normal "BrowseEntry" widget, whereas with the "MSWin32" style the arrow will look close to the Windows' standard combobox widget, while moving the mouse the entries will be highlighted, and probably includes other changes. -variable Specifies the variable in which the entered value is to be stored. METHODS
insert(index, string) Inserts the text of string at the specified index. This string then becomes available as one of the choices. delete(index1, index2) Deletes items from index1 to index2. get The get method is delegated to the choices listbox. ADVERTISED WIDGETS
The following widgets are advertised: entry The entry widget. arrow The button with the arrow image. choices The toplevel widget containing the choice listbox. slistbox The scrolled listbox with the choices. SUBCLASSING
To make subclassing easier, the following methods may be overridden to use other standard widgets in composing the mega widget: LabEntryWidget A widget class compatible with Tk::LabEntry used for the entry. ButtonWidget A widget class compatible with Tk::Button used for the arrow button. ListboxWidget A widget class compatible with Tk::Listbox used for the choices listbox. For example to use a "NumEntry" widget (from the Tk-GBARR CPAN distribution) instead of the normal "Entry" widget: package Tk::NumBrowseEntry; use base qw(Tk::BrowseEntry); use Tk::NumEntry; Construct Tk::Widget 'NumBrowseEntry'; sub LabEntryWidget { "NumEntry" } BUGS
BrowseEntry should really provide more of the ComboBox options. AUTHOR
Rajappa Iyer rsi@earthling.net Chris Dean ctdean@cogit.com made additions. More additions by Slaven Rezic slaven@rezic.de This code was inspired by ComboBox.tcl in Tix4.0 by Ioi Lam and bears more than a passing resemblance to ComboBox code. This may be distributed under the same conditions as Perl. perl v5.16.3 2014-06-10 BrowseEntry(3)
All times are GMT -4. The time now is 08:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy