If i have a variable which is a decimal number, i.e 34.05 How can you make decimal point fall on the 15th character on the screen? Or any other that you can specify? Can you do it using sed or awk? (3 Replies)
Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/
Thanks! (1 Reply)
I have a text file and every line ends in
|^
|^^
|^^^
|^^^^
I need to use sed to make all lines end it
|^
regardless of the amount of carrots.
The code i was using is:
cat FILE | sed 's/\^\^\^/\^/g'
But then they threw that curveball at me. Also is there a way to... (2 Replies)
I have a text file like this
...
B 16 1.340E+05
A 18 3.083E+02
Wu123 1.365E+02
...
I would like to get rid of the 7th character of each line if this is a space character.
Thank you,
Sarah (5 Replies)
cat input.txt
agsbdafgd
ertebrtreter
ahrbrwerg
The last character of a line that does not start with a would be changed to Z.
Final output:
agsbdafgd
ertebrtreteZ
ahrbrwerg
Can anyone post the sed command to do that? (2 Replies)
Hi all,
Greetings,
I have the following scenario, The contents of main file are like :
Unix|||||forum|||||||||||||||is||||||the||best
so||||||be|||||on||||||||||||||||||||||||||||||||||||||||||||it
And i need the output in the following form:
Unix=forum=is=the=best
so=be=on=it
... (3 Replies)
Hi,
i want find the character '-' in a file from position 284-298, if it occurs i need to replace it with 'O ' for the position in the file. How to do that using SED command.
thanks in advance,
Sara (9 Replies)
hello
i have file with 100k records and each one has certain value that starts at 28th column and certain value that starts at 88th column
e.g. 1st file
<25>1234567 ..... <88> 8573785485
i have aditional file with values which are related to value that starts at 88th column of the... (1 Reply)
Hi,
Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank.
Text file :
"1"|"ExternalClassDEA519CF5"|"Art1"
"2"|"ExternalClass563EA516C"|"Art3"
"3"|"ExternalClass305ED16B8"|"Art9"
...
...
... (2 Replies)
Hi all,
I am looking for to filter out based on 7th character and list the number of occurrence based on the 7th character if p , d , o or m
1. if 7th character is p , Output should be: p_hosts = N
2. if 7th character is d , Output should be: d_hosts = N
3. if 7th character is o , Output... (10 Replies)
Discussion started by: rveri
10 Replies
LEARN ABOUT DEBIAN
colorset
COLORS(3) libbash colors Library Manual COLORS(3)NAME
colors -- libbash library for setting tty colors.
SYNOPSIS
colorSet <color>
colorReset
colorPrint [<indent>] <color> <text>
colorPrintN [<indent>] <color> <text>
DESCRIPTION
General
colors is a collection of functions that make it very easy to put colored text on tty.
The function list:
colorSet Sets the color of the prints to the tty to COLOR
colorReset Resets current tty color back to normal
colorPrint Prints TEXT in the color COLOR indented by INDENT (without adding a newline)
colorPrintN The same as colorPrint, but trailing newline is added
Detailed interface description follows.
Available colors:
Green
Red
Yellow
White
The color parameter is non-case-sensitive (i.e. RED, red, ReD, and all the other forms are valid and are the same as Red).
FUNCTIONS DESCRIPTIONS
colorSet <color>
Sets the current printing color to color.
colorReset
Resets current tty color back to normal.
colorPrint [<indent>] <color>
Prints text using the color color indented by indent (without adding a newline).
Parameters:
<indent>
The column to move to before start printing. This parameter is optional. If ommitted - start output from current cursor position.
<color>
The color to use.
<color>
The text to print.
colorPrintN [<indent>] <color>
The same as colorPrint, except a trailing newline is added.
EXAMPLES
Printing a green 'Hello World' with a newline:
Using colorSet:
$ colorSet green
$ echo 'Hello World'
$ colorReset
Using colorPrint:
$ colorPrint 'Hello World'; echo
Using colorPrintN:
$ colorPrintN 'Hello World'
AUTHORS
Hai Zaar <haizaar@haizaar.com>
Gil Ran <gil@ran4.net>
SEE ALSO ldbash(1), libbash(1)Linux Epoch Linux