How can I remove all the non printing characters from a file? I've tried using sed but I can't figure out how ! (change all but...) works with the substitute command.
I know how to do it in perl but I would prefer not to use this solution.
Thanks! (8 Replies)
I have a file which has following contents:
localhost_IP_SIP_1233026552455.xml
localhost_IP_SIP_1233026552460.xml
localhost_IP_SIP_1233026552467.xml
localhost_IP_SIP_1233026552759.xml
localhost_IP_SIP_1233026552969.xml
localhost_IP_SIP_1233026552975.xml ... (2 Replies)
I want to print the contents of a file from 2nd line to last but one line using the AWK command.
I tried using the Shell Script,MyScript as fallows:
MyScript:
{
if(NR>1)
{
if(NR<9)
{
print $0
}
}
}
and used the commnd :
awk -f MyScript Filename
Note: Filename contains 9 lines text.... (0 Replies)
Hi,
I have a script which updates a repository which is run manually. When this happens either no or new files will be added to a specific folder. If there are new files that have been added, an email needs to be sent. How can i check a folder for any new files after the update repos script has... (0 Replies)
Hi one of the output of the command is as below
# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'
Resource List : <br>
*************************** 1. row ***************************<br>
... (2 Replies)
Shell script logic
Hi
I have 2 input files like with file 1 content as (file1)
"BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt
File 2 contents as fle(2)
"BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt
I want to get... (22 Replies)
So I'm stumped.
First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes.
I have a text file (file_source) of terms, each line... (3 Replies)
Today I changed the forum mysql database to permit 2 letter searches:
ft_min_word_len=2
I rebuilt the mysql search indexes as well.
Then, I added a "quick search bar" at the top of each page.
I have tested this and two letter searches are working; but it's not perfect,... (1 Reply)
Hi Team,
I have a file a1.txt with data as follows.
dfjakjf...asdfkasj</EnableQuotedIDs><SQL><SelectStatement modified='1' type='string'><!
The delimiter string: <SelectStatement modified='1' type='string'><!
dlm="<SelectStatement modified='1' type='string'><!
The above command is... (7 Replies)
Discussion started by: kmanivan82
7 Replies
LEARN ABOUT HPUX
dteditorformat
DtEditorFormat(library call) DtEditorFormat(library call)
NAME
DtEditorFormat -- format all or part of the contents of a DtEditor widget
SYNOPSIS
#include <Dt/Editor.h>
DtEditorErrorCode DtEditorFormat(
Widget widget,
DtEditorFormatSettings *formatSettings,
unsigned int amountToFormat);
DESCRIPTION
The DtEditorFormat function formats all or part of the contents of the DtEditor widget according to the current text format settings in the
Format Settings dialog. These options specify which margins and alignments (left aligned, right aligned, justified or centered) are used.
Optionally, alternative settings can be passed as an argument to DtEditorFormat in a data structure. This function formats either the
paragraph containing the insertion cursor or the entire contents of the DtEditor widget, depending on the value of the amountToFormat argu-
ment.
The Format Settings dialog is displayed with DtEditorInvokeFormatDialog(3). For a complete description of formatting and the Format Set-
tings dialog, see DtEditor.
The widget argument specifies the editor widget ID.
The formatSettings argument specifies left margin value, right margin value and the justification style. The LeftMargin and RightMargin
fields of DtEditorFormatSettings must be zero or larger. The Alignment field can have a value of DtEDITOR_ALIGN_CENTER, DtEDI-
TOR_ALIGN_JUSTIFY, DtEDITOR_ALIGN_LEFT or DtEDITOR_ALIGN_RIGHT. If the formatSettings argument is NULL, DtEditorFormat uses the last format
settings specified in the Format Settings dialog.
When the amountToFormat argument is set to DtEDITOR_FORMAT_ALL, it reformats all the text in the edit window. When this argument is set to
DtEDITOR_PARAGRAPH, only the paragraph containing the insertion cursor is formatted.
For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3).
For a complete definition of DtEditorFormatSettings, see Dt/Editor.h - DtEditor(5).
RETURN VALUE
Upon successful completion, the DtEditorFormat function returns DtEDITOR_NO_ERRORS; otherwise, it returns one of the following values:
DtEDITOR_NO_TMP_FILE
The DtEditorFormat function cannot create two temporary files in the directory returned by tmpnam3S.
DtEDITOR_ILLEGAL_SIZE
The left or right margin values are negative.
DtEDITOR_INVALID_RANGE
The amountToFormat argument is not recognized.
DtEDITOR_INVALID_TYPE
The Alignment field is not recognized.
SEE ALSO
Dt/Editor.h - DtEditor(5), DtEditor(3), DtEditorInvokeFormatDialog(3); tmpnam3S.
DtEditorFormat(library call)