11-19-2007
colors in BASH, doubt with script
I was trying to see all combinations of foreground and background colors in BASH.
This works fine for me,
echo -e '\E[37;46m TEXT'
but when I tried the below script, the variables i and j do not expand.
#!/bin/sh
for i in `seq 30 37` # foreground
do
for j in `seq 40 47` #background
do
echo -e '\E[$i;$jm TEXT'
tput sgr0 # Reset text attributes to normal without clear
done
done
I tried
echo -e "\E[$i;$jm TEXT"
echo -e '\E["'"$i"'";"'"$j"'"m TEXT'
no luck, please help.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is it possible to change the color of text in a korn shell script Menu?
I can change the color of session text through my telnet client but I want to be able to change color text in the Korn shell menu to highlight certain items. (6 Replies)
Discussion started by: darthur
6 Replies
2. Shell Programming and Scripting
hello!
I'd like to print on screen amessage.
What can I do to print this message with blue fonts.
thanks... (4 Replies)
Discussion started by: hoang
4 Replies
3. Shell Programming and Scripting
i need to check if any user has logged-in more than once in different terminals and then print the count of those login, so i wrote this command,
who -H | wc -l
but i feel its not accurate , something is wrong ,i have been trying for a long time by trial n error to solve it, but i need... (2 Replies)
Discussion started by: xiphias
2 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
is it poosible to Print the error messages in colors.., i am using KSH...,
i have tried the following,
echo "\033 Hi This is Sam!!!
But, when i tried to redirect in to a log file, i am getting as follows,
echo "\033 1 line, 31 characters
^[[34m Hi This is Sikki!!! ^[[0m
... (0 Replies)
Discussion started by: Serious Sam
0 Replies
5. UNIX for Advanced & Expert Users
Hi Guys,
I am new to this forum, i have doubt with a awk script. I want to generate a list where i can busiest hour from a list of a data.
05/19/2008 14:27:19 - avg: 0 max: 0 min: 0 samples: 0 total: 0
05/19/2008 14:28:19 - avg: 0 max: 0 min: 0 samples: 0 total: 0
05/19/2008 14:29:19 -... (2 Replies)
Discussion started by: asirohi
2 Replies
6. Shell Programming and Scripting
Dear friends,
I have two files. In first file first column ($1), i have numbers.
The second file containes, the same number in the fourth column($4).
I need a output file, matching the first file column 1 with second file column 4. The main thing is the output file lines will be sorted... (4 Replies)
Discussion started by: vasanth.vadalur
4 Replies
7. Shell Programming and Scripting
Hi,
I am using bash shell's extended pattern matching.
What tweak the following code needs in order to get the expected output?
shopt -s extglob
f="a@b@_c@d@_e"
echo "${f/@(@|@_)/__}"
My expected output is:
a__b__c__d__e
but the actual output is:
a__b@_c@d@_e
# that is, how to... (3 Replies)
Discussion started by: royalibrahim
3 Replies
8. Shell Programming and Scripting
Hello All,
I am setting up a cron job, where i am calling a shell script to make few builds. I got struck at a point, need some expert inputs to proceed further.
The script is categorized in 5 parts and in the last part while building software it asks for few questions like:-
1. Build mode... (4 Replies)
Discussion started by: sahil_jammu
4 Replies
9. Shell Programming and Scripting
Hello guys :)
I've a some issue with a function which use the bash colors in my script.
An example :
#!/bin/bash
set -x
log_in(){
host="srv1"
remote_files="log/"
LOG_FILE="logfile"
green='\033]; then
color_in_red=("${red}"$2"${none}")
echo -e... (2 Replies)
Discussion started by: Arnaudh78
2 Replies
10. Shell Programming and Scripting
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
Discussion started by: siegfried
3 Replies
LEARN ABOUT CENTOS
drop_text_search_configuration
DROP TEXT SEARCH
CONFIGURATION(7) PostgreSQL 9.2.7 Documentation DROP TEXT SEARCH CONFIGURATION(7)
NAME
DROP_TEXT_SEARCH_CONFIGURATION - remove a text search configuration
SYNOPSIS
DROP TEXT SEARCH CONFIGURATION [ IF EXISTS ] name [ CASCADE | RESTRICT ]
DESCRIPTION
DROP TEXT SEARCH CONFIGURATION drops an existing text search configuration. To execute this command you must be the owner of the
configuration.
PARAMETERS
IF EXISTS
Do not throw an error if the text search configuration does not exist. A notice is issued in this case.
name
The name (optionally schema-qualified) of an existing text search configuration.
CASCADE
Automatically drop objects that depend on the text search configuration.
RESTRICT
Refuse to drop the text search configuration if any objects depend on it. This is the default.
EXAMPLES
Remove the text search configuration my_english:
DROP TEXT SEARCH CONFIGURATION my_english;
This command will not succeed if there are any existing indexes that reference the configuration in to_tsvector calls. Add CASCADE to drop
such indexes along with the text search configuration.
COMPATIBILITY
There is no DROP TEXT SEARCH CONFIGURATION statement in the SQL standard.
SEE ALSO
ALTER TEXT SEARCH CONFIGURATION (ALTER_TEXT_SEARCH_CONFIGURATION(7)), CREATE TEXT SEARCH CONFIGURATION
(CREATE_TEXT_SEARCH_CONFIGURATION(7))
PostgreSQL 9.2.7 2014-02-17 DROP TEXT SEARCH CONFIGURATION(7)