Sponsored Content
Top Forums Shell Programming and Scripting sed to remove newline chars based on pattern mis-match Post 302976882 by RudiC on Thursday 7th of July 2016 01:59:32 PM
Old 07-07-2016
It's appending N ext lines and branching back to label L until it finds the ; , then branches to X , replaces \n with spaces and prints the resulting line.
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep and sed to find a pattern and add newline

Hello All, I have log file the result from a multithreaded process. So when a process finishes it will write to this log file as 123 rows merged. The issue is sometimes the processess finish at the same time or write to the file at the same time as 123 rows merged.145 rows merged. At... (5 Replies)
Discussion started by: ssikhar
5 Replies

2. Shell Programming and Scripting

sed ksh remove newline between 2 containers

If we assume that each line between the {} container is an XML document then What I want to remove the newline character from all lines within each container to have one XMDL document per line I wrote a bit of sed after trawling the web: e.g. #!/bin/sed -nf H /}/ { x s/\n//g p... (3 Replies)
Discussion started by: JamesJSC
3 Replies

3. Shell Programming and Scripting

SED: how to remove newline after pattern?

Hi, I have the following XML not well-indented code: <hallo >this is a line </hallo> So I need to remove the newline. This syntax finds what I need to correct, but I don't know how to remove the newline after my pattern: sed 's/<.*$/&/' How can I subtract the newline after my... (1 Reply)
Discussion started by: nico.ben
1 Replies

4. Shell Programming and Scripting

remove newline chars in each record of file

Hi, I have a fixed width file with record length 10. I need to remove multiple newline characters present in each record. EX: af\n72/7\n s\n3\nad\n 2\n\n33r\n In the above file I want to remove new lines in red color(\n) but not (\n) Please provide me a solution. Thanks, Sri (1 Reply)
Discussion started by: srilaxmi
1 Replies

5. Shell Programming and Scripting

sed/awk remove newline

Hi, I have input file contains sql queries i need to eliminate newlines from it. when i open it vi text editor and runs :%s/'\n/'/g it provides required result. but when i run sed command from shell prompt it doesn't impact outfile is still same as inputfile. shell] sed -e... (6 Replies)
Discussion started by: mirfan
6 Replies

6. Shell Programming and Scripting

remove newline between two string with sed command in unix shellscript

I have a file (test.dat) which contains data like this 459|199811047|a |b |shan kar|ooty| 460|199811047|a |bv |gur u|cbe| but I need it like: 459|199811047|a |b |shankar|ooty| 460|199811047|a |b |guru|cbe| While reading the data from this file, I don't want to remove newline from the end of... (4 Replies)
Discussion started by: jcrshankar
4 Replies

7. Shell Programming and Scripting

Remove duplicate chars and sort string [SED]

Hi, INPUT: DCBADD OUTPUT: ABCD The SED script should alphabetically sort the chars in the string and remove the duplicate chars. (5 Replies)
Discussion started by: jds93
5 Replies

8. Shell Programming and Scripting

Awk-sed help : to remove first and last line with pattern match:

awk , sed Experts, I want to remove first and last line after pattern match "vg" : I am trying : # sed '1d;$d' works fine , but where the last line is not having vg entry it is deleting one line of data. - So it should check for the pattern vg if present , then it should delete the line ,... (5 Replies)
Discussion started by: rveri
5 Replies

9. UNIX for Dummies Questions & Answers

Mac OS X sed, add newline after pattern

Hi, I've been trying to work out how to add a new line to a file when the pattern matches .dmg. I've been searching Google but yet not found a working solution. Help would be appreciated... (9 Replies)
Discussion started by: pburge
9 Replies

10. Shell Programming and Scripting

sed - print only the chars that match a given set in a string

For a given string that may contain any ASCII chars, i.e. that matches .*, find and print only the chars that are in a given subset. The string could also have numbers, uppercase, special chars such as ~!@#$%^&*(){}\", whatever a user could type in without going esoteric For simplicity take... (1 Reply)
Discussion started by: naderra
1 Replies
create-branching-keyboard(1)					   User Commands				      create-branching-keyboard(1)

NAME
create-branching-keyboard - create branching keyboards for GOK SYNOPSIS
create-branching-keyboard [--usage] infile [n-desired-rows] DESCRIPTION
create-branching-keyboard takes an input data file and creates a family of branching keyboard XML files in the format that GOK expects. Given an input file named test.data, create-branching-keyboard creates test.data.kbd, which in turn refers to a family of *.kbd files that are created based on data in the input file. OPTIONS
The following options are supported: --usage Display usage information. OPERANDS
The following operands are supported: infile The name of the input file. n-desired-rows If specified, create-branching-keyboard attempts to create keyboards with the specified number of rows. The recommended values are between 2 and 6. EXTENDED DESCRIPTION
create-branching-keyboard can be used to create families of branching keyboards from UTF-8 input files. The format of the input files is as follows: o Lines beginning with '#' are ignored. o The rest of the input file consists of consecutive pairs of lines. The first line of a pair is typically ignored, but should serve as a UTF-8 label describing the "primary key" in the next line. The second line of the pair consists of a single UTF-8 character followed by a ':' color delimiter, and a string of UTF-8 characters to which the initial character may branch. The resulting XML file, after processing, defines .kbd files such that each prefix 'primary key' forms a key on the GOK keyboard whose label is the "primary key" UTF-8 character, and which branches to a keyboard consisting of the following UTF-8 characters, one per key. create-branching-keyboard is particularly useful in creating branching keyboards for ideographic languages. For instance, the primary key for a given line may consist of the UTF-8 character for a 'radical' such as hng. EXAMPLES
Example 1: Creating Branching Keyboards From a File Called test.data example% create-branching-keyboard test.data EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/create-branchinExecutable to create branching keyboards for GOK ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-a11y-gok-share | | | | | |SUNWgnome-a11y-gok | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
Latest version of the GNOME Desktop User Guide for your platform. gok(1) NOTES
The create-branching-keyboard utility is experimental and unsupported. Written by Bill Haneman, Sun Microsystems Inc., 2004. SunOS 5.10 7 Sep 2004 create-branching-keyboard(1)
All times are GMT -4. The time now is 04:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy