Sponsored Content
Top Forums Shell Programming and Scripting Replacing all but last Hex characters in a text line Post 48979 by BAH on Tuesday 23rd of March 2004 05:14:20 AM
Old 03-23-2004
Replacing all but last Hex characters in a text line

I must remove hex characters 0A and 0D from several fields within an MS Access Table. Since I don't think it can be done in Access, I am trying here.
I am exporting a Table from Access (must be fixed length fields, I think, for my idea to work here) into a text format.
I then want to run a script that will replace all instances of hex 0A from the line .... except for the very last instance ... with some other character ... say a hex 7C
Example: If I have 20 fields within Access for a total export line length of 2000 characters, I want to replace all the hex 0A characters (which is a CR/LF character, I believe) from positions 1-1999 with hex 7C (which is shift-\).
Anybody have any creative ideas? I would very much appreciate it.
Brad

Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replacing characters in file with line break

Hi, Apologies if this has been asked before, but I searched and was not able to find an answer. It's probably a simple question to answer for those of you with some experience, though... I have a relatively long string where tokens are separated by the colon (':') character. Let's say the... (10 Replies)
Discussion started by: johnemb
10 Replies

2. Shell Programming and Scripting

replacing certain characters with new line?

i have a text file which domains something like this 123213213213/32434342 324324324/12312321321 12321321,435435435 12321312 / 12313213 / 12435435345 4353213 , 123213213213 21321321312-12334324 234324324 - 235645645645 456456456 - 45456456456 - 45645645654243 how can i replace '/' and... (4 Replies)
Discussion started by: Bashar
4 Replies

3. Shell Programming and Scripting

Replacing hex characters '\x0D' with '\x0D\x0A'

Hello All, I have a requirement where I need to replaced the hex character - '\x0D' with 2 hex characters - 'x0D' & 'x0A' I am trying to use SED - But somehow its not working. Any pointers? Also the hex character '\x0D' can occur anywhere in the line. Can this also be accomplished... (6 Replies)
Discussion started by: paragkalra
6 Replies

4. Shell Programming and Scripting

Replacing text/characters in vi

ok, so i have the following text to replace but it's not working. can someone please help me out: :%s~awk '// {split($2,s,",");a=$1 FS s} /-/ {b=a} END{print b}'~tail -1~g I want to replace the entire awk command with tail -1. thanks (7 Replies)
Discussion started by: SkySmart
7 Replies

5. UNIX for Dummies Questions & Answers

Replacing hex characters

I have the following file consisting of dates and sample measurements: 05��Oct��2010 1.31�� 06��Oct��2010 1.32�� 07��Oct��2010 1.31�� The hex characters are \xc2\xa0 in sequence. I have tried to remove the characters as follows: sed -i '' -e 's/\xc2\xa0//g' file.dat and as follows... (6 Replies)
Discussion started by: figaro
6 Replies

6. Shell Programming and Scripting

Replacing text on every third line

I have file like this "copy table_name from filea.txt on node replace delimiter '|';" "copy table_name from fileb.txt on node replace delimiter '|';" "copy table_name from filec.txt on node replace delimiter'|';" "copy table_name from filee.txt on node replace delimiter '|';" "copy... (1 Reply)
Discussion started by: nnani
1 Replies

7. Shell Programming and Scripting

Replacing text in Perl given by command line

Hi I need to write a Perl script that the file given as first argument of the command line that will find all occurrences of the string given as the third argument of the command line and replace with the string given as the fourth argument. Name newfound file is specified as the second... (3 Replies)
Discussion started by: nekoj
3 Replies

8. Shell Programming and Scripting

Replacing end of line characters

Hello, I'm looking for some help in renaming data-timestamps stored within different calendar directories/files. The calendar directory has hundreds of ICS files: ~/Library/Calendars/F494C908.calendar/Events/92B65E439AAC.ics ~/Library/Calendars/F494C908.calendar/Events/DE7867E61969.ics... (8 Replies)
Discussion started by: Schubi
8 Replies

9. HP-UX

Replacing Hex Characters In A File Using awk?

Hi guys, First off, i'm a complete noob to UNIX and LINUX so apologies if I don't understand the basics! I have a file which contains a hex value of '0D' at the end of each line when I look at it in a hex viewer. I need to change it so it contains a hex value of '0D0A0A' I thought... (10 Replies)
Discussion started by: AndyBSG
10 Replies

10. Shell Programming and Scripting

Checking and replacing first line in text file, one-liner?

Hello, I'm looking to check only the first line of a file to see if it is a format string, like # -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -\*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2if the first line is anything else, insert the above string. I'd... (3 Replies)
Discussion started by: f77hack
3 Replies
ApplicationShell(3X)													      ApplicationShell(3X)

NAME
ApplicationShell - The ApplicationShell widget class SYNOPSIS
#include <Xm/Xm.h> #include <X11/Shell.h> DESCRIPTION
ApplicationShell is used as the main top-level window for an application. An application should have more than one ApplicationShell only if it implements multiple logical applications. Classes ApplicationShell inherits behavior and resources from Core, Composite, Shell, WMShell, VendorShell, and TopLevelShell. The class pointer is applicationShellWidgetClass. The class name is ApplicationShell. New Resources The following table defines a set of widget resources used by the programmer to specify data. The programmer can also set the resource values for the inherited classes to set attributes for this widget. To reference a resource by name or by class in a .Xdefaults file, remove the XmN or XmC prefix and use the remaining letters. To specify one of the defined values for a resource in a .Xdefaults file, remove the Xm prefix and use the remaining letters (in either lowercase or uppercase, but include any underscores between words). The codes in the access column indicate if the given resource can be set at creation time (C), set by using XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A). ApplicationShell Resource Set Class: XmCArgc Default: 0 Type: int Access: CSG Class: XmCArgv Default: NULL Type: String * Access: CSG Specifies the number of arguments given in the XmNargv resource. The function XtInitialize sets this resource on the shell widget instance it creates by using its parameters as the values. Specifies the argument list required by a session manager to restart the application, if it is killed. This list should be updated at appropriate points by the application if a new state has been reached which can be directly restarted. The function XtInitialize sets this resource on the shell widget instance it creates by using its parameters as the values. Inherited Resources ApplicationShell inherits behavior and resources from the following superclasses. For a complete description of each resource, refer to the manual page for that superclass. TopLevelShell Resource Set Class: XmCIconic Default: False Type: Boolean Access: CSG Class: XmCIconName Default: NULL Type: String Access: CSG Class: XmCIconNameEn- coding Default: dynamic Type: Atom Access: CSG VendorShell Resource Set Class: XmCAudibleWarning Default: XmBELL Type: unsigned char Access: CSG Class: XmCButtonFontList Default: dynamic Type: XmFontList Access: CSG Class: XmCDefaultFontList Default: dynamic Type: XmFontList Access: CG Class: XmCDeleteResponse Default: XmDESTROY Type: unsigned char Access: CSG Class: XmCInputMethod Default: NULL Type: String Access: CSG Class: XmCKeyboardFocusPolicy Default: XmEXPLICIT Type: unsigned char Access: CSG Class: XmCLabelFontList Default: dynamic Type: XmFontList Access: CSG Class: XmCMwmDecorations Default: -1 Type: int Access: CSG Class: XmCMwmFunctions Default: -1 Type: int Access: CSG Class: XmCMwmInputMode Default: -1 Type: int Access: CSG Class: XmCMwmMenu Default: NULL Type: String Access: CSG Class: XmCPreeditType Default: dynamic Type: String Access: CSG Class: XmC- ShellUnitType Default: XmPIXELS Type: unsigned char Access: CSG Class: XmCTextFontList Default: dynamic Type: XmFontList Access: CSG Class: XmCUseAsyncGeometry Default: False Type: Boolean Access: CSG WMShell Resource Set Class: XmCBaseHeight Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCBaseWidth Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCHeightInc Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCIconMask Default: NULL Type: Pixmap Access: CSG Class: XmCIconPixmap Default: NULL Type: Pixmap Access: CSG Class: XmCIconWindow Default: NULL Type: Window Access: CSG Class: XmCIconX Default: -1 Type: int Access: CSG Class: XmCIconY Default: -1 Type: int Access: CSG Class: XmCInitialState Default: Nor- malState Type: int Access: CSG Class: XmCInput Default: True Type: Boolean Access: CSG Class: XmCMaxAspectX Default: XtUnspecified- ShellInt Type: int Access: CSG Class: XmCMaxAspectY Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCMaxHeight Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCMaxWidth Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCMinAspectX Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCMinAspectY Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCMinHeight Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCMinWidth Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCTitle Default: dynamic Type: String Access: CSG Class: XmCTitleEncoding Default: dynamic Type: Atom Access: CSG Class: XmCTran- sient Default: False Type: Boolean Access: CSG Class: XmCWaitForWm Default: True Type: Boolean Access: CSG Class: XmCWidthInc Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCWindowGroup Default: dynamic Type: Window Access: CSG Class: XmCWinGravity Default: dynamic Type: int Access: CSG Class: XmCWmTimeout Default: 5000 ms Type: int Access: CSG Shell Resource Set Class: XmCAllowShellResize Default: False Type: Boolean Access: CG Class: XmCCreatePopupChildProc Default: NULL Type: XtCreatePopupChild- Proc Access: CSG Class: XmCGeometry Default: NULL Type: String Access: CSG Class: XmCOverrideRedirect Default: False Type: Boolean Access: CSG Class: XmCCallback Default: NULL Type: XtCallbackList Access: C Class: XmCCallback Default: NULL Type: XtCallbackList Access: C Class: XmCSaveUnder Default: False Type: Boolean Access: CSG Class: XmCVisual Default: CopyFromParent Type: Visual * Access: CSG Composite Resource Set Class: XmCReadOnly Default: NULL Type: WidgetList Access: G Class: XmCInsertPosition Default: NULL Type: XtOrderProc Access: CSG Class: XmCReadOnly Default: 0 Type: Cardinal Access: G Core Resource Set Class: XmCAccelerators Default: dynamic Type: XtAccelerators Access: CSG Class: XmCSensitive Default: dynamic Type: Boolean Access: G Class: XmCBackground Default: dynamic Type: Pixel Access: CSG Class: XmCPixmap Default: XmUNSPECIFIED_PIXMAP Type: Pixmap Access: CSG Class: XmCBorderColor Default: XtDefaultForeground Type: Pixel Access: CSG Class: XmCPixmap Default: XmUNSPECIFIED_PIXMAP Type: Pixmap Access: CSG Class: XmCBorderWidth Default: 1 Type: Dimension Access: CSG Class: XmCColormap Default: dynamic Type: Colormap Access: CG Class: XmCDepth Default: dynamic Type: int Access: CG Class: XmCCallback Default: NULL Type: XtCallbackList Access: C Class: XmCHeight Default: dynamic Type: Dimension Access: CSG Class: XmCInitialResourcesPersistent Default: True Type: Boolean Access: C Class: XmCMapped- WhenManaged Default: True Type: Boolean Access: CSG Class: XmCScreen Default: dynamic Type: Screen * Access: CG Class: XmCSensitive Default: True Type: Boolean Access: CSG Class: XmCTranslations Default: dynamic Type: XtTranslations Access: CSG Class: XmCWidth Default: dynamic Type: Dimension Access: CSG Class: XmCPosition Default: 0 Type: Position Access: CSG Class: XmCPosition Default: 0 Type: Posi- tion Access: CSG Translations There are no translations for ApplicationShell. SEE ALSO
Composite(3X), Core(3X), Shell(3X), WMShell(3X), VendorShell(3X), TopLevelShell(3X) ApplicationShell(3X)
All times are GMT -4. The time now is 02:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy