Ubuntu :: Changing Text Colour In Bash Script
Apr 9, 2011How can I go about making an echo with specific text in colour in bash?. this is the result I want: Code: I like Red!
View 4 RepliesHow can I go about making an echo with specific text in colour in bash?. this is the result I want: Code: I like Red!
View 4 RepliesDont know how to explain this properly but in some forums on the net, no matter what text colour i change its always very light in colour. How can I change this so that the text is black as in when typing here for eg? its not the actual setting of the forum as I have looked through it thoroughly.
View 1 Replies View RelatedI have an EPSON RX620, it works just fine in Ubuntu and I can redirect text to "lp" and it also prints just fine, but in black only.Are there any utilities I can use to print text in different colours from a bash script?Do I need to insert escape characters or pipe through another program?
View 9 Replies View RelatedHow can I change the text colour on the panel from black to white?I am using Karmic 9.10 with clearlooks and crux window borders.I have changed the panel background to the Thai flag, but it is blue where the text lies, and white text is easier to read than black on a blue background.
View 3 Replies View RelatedIs it possible to change the highlight colour of selected text when OOo Writer 3.1.1 is running under Xfce 4.6.1?
After using "Find and Replace" to search for and select text, the default pale blue used since 3.1 does not stand out clearly against a white background. This is particularly problematic for short search strings and for search targets found in the Table of Contents (blue text on grey background).
According to Robert Tucker in the OOo Forum thread "On Gnome on Fedora the background of selected text can definitely be changed at System>Preferences>Appearance, Theme Tab, Customize button, Selected items button". I cannot find any equivalent in Xfce; can it be done?
I'd like to change the font characteristics (size, colour) on initial login screen (list of users) however I cannot find the configuration options.
View 6 Replies View Relatedi am on processing text tasks And i found that if you assign a text to a variable is chomp'ed automatically the newline
Code:
variable=$(cat file.txt)
The problem is i can only access the items/lines using:
Code:
for line in $variable
do
echo $line
# Other commands
done
how do i convert this to an indexed array. More importantly, how do i get access to individual $line[0], ..., $line[n] Another thing, if the file.txt, has lines with spaces it is a mess using the for...in..., but echoing prints line by line...o_0
I can't seem to find anywhere that allows me to change the direction in which text is displayed/entered. I'm trying to change from "left to right, top to bottom" to "top to bottom, left to right".
View 5 Replies View RelatedRather than having my text aligned to the left side of the window, I was wondering if there's a way to align it to the center?
View 8 Replies View RelatedI have a theme that looks like this.
Unfortunately, it makes the globalmenu and clock applets disappear on my gnome-panel. My panel is set to system theme, though when I choose a solid color I can get the hidden text to show up. I want to preserve the system color so I need to change the text color somehow. Also, I don't know why it uses that bluish color when clicked on since I never defined such a color in the appearance settings.
Is it possible to change a color of the text cursor for all GUI applications in GNOME? Now it's black but I want it was blue or red. How can I achieve it
View 1 Replies View RelatedI was just doing some basic changes really for Orta and now when I try to login to Ubuntu, the text box for entering my password at the login screen.
View 9 Replies View RelatedBasically I'm trying to create a bash script that'll ask for a folder name and then change into that folder.
Code:
Not real code but bare with me!
echo "Enter the desired folder and press [ENTER]
read $folder
cd $folder
pwd
/home/<user name>/<whatever the user entered>
Is this possible with bash or am I chasing a pipe dream?
I was attempting to change the bash shell color prompt on my RHEL / CentOS 5 server. When I login as my user account on my server I can see my 'PS1':
Code:
[carlos@srv1 ~]$ echo $PS1
[u@h W]$
I want to change my PS1 to:
PS1='[e[1;32m][u@h W]$[e[0m] '
When I look in ~/.bashrc, I don't see my 'PS1' line so I am confused and wondering how I do this on RHEL / CentOS systems.
I am running Debian Jessie with Gnome 3.14.2 on a Macbook Pro 15" with retina display. My resolution is currently set to 2880:1800 and any time I try to lower it, the whole screen goes to black (even if I change it to something in the 16:10 ratio) and I just have to keep force restarting when doing that. I want to lower it because a lot of stuff is really small. Certain aspects of windows in programs are so small, and in order to properly view stuff on my web browser I have to increase the magnification to around 250% for it to be reasonable.
Some things seem normally sized in the windows, and thus make things awkward on the screen, especially in chrome. Is there a way to fix this without having to change my resolution and/or font sizes? Making font sizes bigger on the gnome tweak tool makes things look a bit more awkward because it squeezes the text into small spaces. I would rather keep a higher resolution for a better picture, and changing it seems to mess things up. Here is what my browser looks like (without magnifying). Notice how the font size in the bookmark bar is disproportionately large compared to the buttons in the top right to close/max/min the window.
And this problem isn't just in the browser, but for example, in matlab everything is extremely tiny. I want to make everything larger, not just the text...
I would like to set the default text editor in Xfce to gedit. The only solution that I found on Google was to right click on a given text file, select 'open with other application', sleect gedit, and make sure that the "use as default kind" button is checked. Unfortunately this only works for text files with the same extension as the original file. Is there a way of setting every text file to open with gedit by default that doesn't involve repeating this exercise for every possible text file extension (.c, .py, .h, .hs, etc.)?
View 3 Replies View RelatedI have a ubuntu linux working in TEXT mode. I would like the change the font size (or if possible, get my terminal with inconsolata font). How can i do it?
PS: i don't have a GUI or X Windows running.
sudo dpkg-reconfigure console-setup
I have a user that has been used for long time now that runs o C Shell... now there is a need to change it to Bash Shell? Can I cause a problem changing his shell from C to bash? I mean apps or variables?
View 2 Replies View RelatedI am writing a bash script that utilizes the output of another script (which I will refer to as script#2.) Script#2 is not owned by me, I cannot modify it. All of the output from script#2 is blue, which makes it difficult for me to read.
I would like to have the output of it changed to grey. Is there a way I can do that in my script? A command I can pipe the output to?
Edit: One other question related to this. I put a trap function in my script that works well. Script#2 essentially runs a tail -f. When I ctrl+c to stop it, it stops script#2 and never calls the trap in my script. Is there any way I can work around that?
I am tying to write a script that asks for user input and saves it to a text file using awk so example #!/bin/bash read a awk #saves to file
I had a working scripted last night, deleted it by mistake and for the life of me can not remember how i did it.
I created text for a bunch of "#!/bin/bash" scripts in MS SQL Server. Being on a Windows machine, I used Ultraedit to create text files for a few examples. After copying the files to a machine running Ubuntu 10.10, I changed group and owner, and made them executable. However, they won't execute. I get "file not found" errors. But, if I paste the content into text files created in Ubuntu, it runs fine.
View 1 Replies View Related(bare with me as I am sort of new with scripting) I am trying to figure out how to run a script that does a basic chkconfig and to get only those services that are running, but changing the color of "on" to red in my output file. Here is what I am working with so far:
Quote:
#/bin/bash
RED=$(tput setaf 1)
BLK=$(tput setaf 0)
[code]....
*I had to substitute a "-" and <colon_symbol> for ":" in front of the on's, because the forum thought they were smiley faces (i.e. n) how to make the "on" to be red while the rest of everything remains in black text. I have been trying to read up on sed and awk, but it is still pretty much a mystery to me right now. There will be other things in the output file that I wouldn't want a rogue "on" to be in red, so just the instances of "on" in that one chkconfig return.
I'm having problems with Tomboy. I have a few hundred note files and I need to go through all of them and replace all instances of "<link:broken>a</link:broken>" with "a". Is there a bash command I can use to do this?
View 2 Replies View RelatedI would like to append text to a file. so i wrote in bashecho text >> file.confHowever it doesnt leave a new line. So i can only do this once. How do i add a new line?
View 2 Replies View RelatedI need to search for a string "teststring" in all *.java files coming under /home/user1/ (including subfolders). How can I do it in linux via shell command.
View 5 Replies View RelatedI am looking at how to add particular text to a file in bash.Here is what I am trying to do:In the /etc/grub.conf file, I am trying to add "audit=1" (without the quotes) to the end of the kernel line...such as:kernel /vmlinuz-2.6.18-194.el5 ro root=LABEL=/1 rhgb quiet audit=1
As there are a few different lines in this file, I am only looking to add the "audit=1" to the above line via a bash script.
I have a lot a folders, each named by a number, and in each of these folders I have a specific file (stddev.dat) containing a single line (of numbers) I need to have a single file with each line being one of the stddev.dat (no matter if it is sorted or not), and also I need to add at the begining of each line the number of the folder it comes from.
I 'm no bash expert, and the "add at the begining of the line" is a bit of problem to me". Here is what I've come up with so far, just to put everything in one file, (and also if you know a better/more elegant way to do the same thing I've done, I'm listening)
[Code]...
The output of following code is not like it's intended ...
Code:
This is the output:
Code:
Test prepending ...apple is a nice word, hour is a nice word, But of course what I want to do in the first set of commands is to prepend the word "an" to the words "apple" and "hour" in the for-loop.
i have a table in a text file. How can i remove from that table for example "SLS= " if the value is empty? Is it possible to do it in bash awk or sed? [URL]
10.25 SLS=* G.V.=* BBU=122 G.V.=14
10.28 SLS=196 G.V.=198 BBU=* G.V.=*
10.08 U.T.=* I.M=--
10.15 U.T.=-0.522 I.M=*
I need to Read a path of a file witch is written in Text file i used this
Code:
FILENAME=$1
while read line
do
echo $line
done < $FILENAME
it worked and showed me the Line witch was written in my file but now my problem is how am gonna use that line as a path i mean for example if am gonna execute a linux command on that file like dpkg -i /path/to/the/file how am gonna export it from The $Line variable and use it after the command.