Sponsored Content
Top Forums Shell Programming and Scripting sed random \n for "n" range of character occurrences Post 302977627 by RudiC on Wednesday 20th of July 2016 03:42:57 PM
Old 07-20-2016
I'm not aware of a random function in sed; which version do you use?

And, while your code sample (ignoring the RANDOM stuff) will add a <NL> char to some EOL (end of line), in post#1 you specify that dots should be replaced. Do I guess correctly that dots are not necessarily at EOLs?

Would a non-sed solution be acceptable?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

removing the "\" and "\n" character using sed or tr

Hi All, I'm trying to write a ksh script to parse a file. When the "\" character is encountered, it should be removed and the next line should be concatenated with the current line. For example... this is a test line #1\ should be concatenated with line #2\ and line number 3 when this... (3 Replies)
Discussion started by: newbie_coder
3 Replies

2. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

3. UNIX for Dummies Questions & Answers

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

4. UNIX for Advanced & Expert Users

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

5. Shell Programming and Scripting

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

6. Shell Programming and Scripting

How to print range of lines using sed when pattern has special character "["

Hi, My input has much more lines, but few of them are below pin(IDF) { direction : input; drc_pinsigtype : signal; pin(SELDIV6) { direction : input; drc_pinsigtype : ... (3 Replies)
Discussion started by: nehashine
3 Replies

7. Shell Programming and Scripting

sed escape character for comment string "/*"

Good afternoon all, I'm hoping my newbie question can help bolster someone's street_cred.sh today. I'm trying to "fingerprint" SQL on its way into the rdbms for a benchmarking process (so I can tie the resource allocation back to the process more precisely). To do this, I'm essentially... (4 Replies)
Discussion started by: toeharp
4 Replies

8. Shell Programming and Scripting

Using sed to find text between a "string " and character ","

Hello everyone Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
Discussion started by: haggismn
10 Replies

9. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

10. Shell Programming and Scripting

Replacing character "|" in given character range

Hi I am having file : 1|2443094 |FUNG SIU TO |CLEMENT 2|2443095 |FUNG KIL FO |REMENT This file contains only 3 fields delimeted by "|". Last field is a decsription filed and it contains character "|". Due to this my output if breaking in 4 fields. I... (7 Replies)
Discussion started by: krsnadasa
7 Replies
TEK4957(4x)															       TEK4957(4x)

NAME
tek4957 - Tektronix 4957 input driver SYNOPSIS
Section "InputDevice" Identifier "idevname" Driver "tek4957" Option "Device" "devpath" ... EndSection DESCRIPTION
tek4957 is an XFree86 input driver for the Tektronix 4957 tablet. The tek4957 driver functions as a pointer input device, and may be used as the X server's core pointer. CONFIGURATION DETAILS
Please refer to XF86Config(5x) for general configuration details and for options that can be used with all input drivers. This section only covers configuration details specific to this driver. Option "Device" "devpath" sets the path to the special file which represents serial line where the tablet is plugged, for example /dev/ttyS0. This option is mandatory. Option "DeviceName" "name" sets the name of the X device. Option "Speed" "number" sets the sampling rate, from 1 to 6. Default is 6, maximum speed. Option "Resolution" "number" sets the resolution. 0 : 2340 dots : 1/200 inch 1 : 2972 dots : 1/10 mm 2 : 11700 dots : 1/1000 inch 3 : 11887 dots : 1/40 mm 4 : 5850 dots : 1/500 inch 5 : 5944 dots : 1/20 mm : default 6 : 4680 dots : 1/400 inch 7 : 1170 dots : 1/100 inch 8 : 12 dots : 1 inch 9 : 24 dots : 1/2 inch Option "TopX" "number" X coordinate of the top corner of the active zone. ( Default = 0 ) Option "TopY" "number" Y coordinate of the top corner of the active zone. ( Default = 0 ) Option "BottomX" "Inumber" X coordinate of the bottom corner of the active zone. ( Default = full scale ) Option "BottomY" "number" Y coordinate of the bottom corner of the active zone. ( Default = full scale ) BUGS
/ LIMITATIONS Currently, only "Absolute" mode is supported ( Sorry ) SEE ALSO
XFree86(1), XF86Config(5x), xf86config(1), Xserver(1), X(7x). AUTHORS
Olivier DANET <odanet@caramail.com> XFree86 Version Version 4.3.0 TEK4957(4x)
All times are GMT -4. The time now is 08:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy