Hi,
I have a script which removes 2 header records and 1 trailer record in a list of files. The commands doing the actions are
sed '1,2d' $file > tempfile1.dat
sed '$d' < tempfile1.dat > $output.txt
Its working fine for all records except a file having size=1445509814 and number of... (2 Replies)
Hi,
I have a requirement as below
Input
Jacuzzi,"Jet Rings, Pillows",Accessory,Optional,,9230917,69094,,P556805,69094,FALSE,1,0,,
Jacuzzi,"Jet Rings, Pillows, Skirt/Apron",Accessory,Optional,,9230917,69094,,P556805,69094,FALSE,1,0,,
Output
Jacuzzi,"Jet Rings!@%... (6 Replies)
Hey guys,
I need to first generate some random characters, which I am already doing perfectly as follows:
randomize=`cat /dev/urandom | tr -dc "a-z0-9" | fold -w 6 | head -n 1`
This is where I am stuck...I need to sed replace some static values with those random characters, but I need each... (4 Replies)
I have a text file where I want to use sed to do multiple replacements all at once (i.e. with a single command) . I want to convert all AA's to 0, all AG's to 1 and all GG's to 2. How do I go about doing that? Thanks! (2 Replies)
Hello all. I am a beginner UNIX user who is using UNIX to work on a bioinformatics project for my university.
I have a bit of a complicated issue in trying to use sed (or awk) to "find and replace" bases (letters) in a genetics data spreadsheet (converted to a text file, can be either... (3 Replies)
Dear All,
could you please help me to remove \n characters after all other replacements have been done as in the code below:
{
#remove punctuation and starting whitespaces
gsub("]"," ");
$1=$1;
}
{
#print lines containing 'whatever'
if ($1=="whatever")
{print}
#print... (3 Replies)
Hi all,
I have a moderate size (300 lines) BASH Shell script that performs various tasks on different source reports (CSV files). One of the tasks that it performs, is to use SED to replace 'non-conforming' titles with conformant ones. For example "How to format a RAW Report" needs to become... (3 Replies)
Hello,
I'm looking for advice on how to optimize this bash script, currently i use the shotgun approach to avoid file io/buffering problems of forks trying to write simultaneously to the same file. i'd like to keep this as a fairly portable bash script rather than writing a C routine.
in a... (8 Replies)
I have a fasta file like this one:
>ID1
AAAAAA
>ID2
TTTTTT
And I am using this sed script to increase the count sequence
sed '/^>/s/.*//;/^$/=;/^$/d' text.txt | sed 's/.*/echo ">seq" \$(( ( & + 1 )\/2 ))/e'
I get the desired output:
>seq 1
AAAAAA
>seq 2
TTTTTT
However, this... (9 Replies)
Hello scripting geniusii! I come to kneel before the alter of your wisdom!
I am looking to take a keyword and replace characters within that keyword and add them to a string variable. I would like this to only go through however many characters the word has, which may vary in size.
... (10 Replies)
Discussion started by: ghaniba
10 Replies
LEARN ABOUT NETBSD
set_color
set_color(1) fish set_color(1)NAME
set_color - set_color - set the terminal color
set_color - set the terminal color
Synopsis
set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR]
Description
Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple,
cyan, white and normal.
o -b, --background Set the background color
o -c, --print-colors Prints a list of all valid color names
o -h, --help Display help message and exit
o -o, --bold Set bold or extra bright mode
o -u, --underline Set underlined mode
o -v, --version Display version and exit
Calling set_color normal will set the terminal color to whatever is the default color of the terminal.
Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey
font color, while set_color --bold white will result in a white font color.
Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator.
set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and
incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of
ncurses and recompile fish against it in order to fix this issue.
Version 1.23.1 Sun Jan 8 2012 set_color(1)