Sponsored Content
Top Forums Shell Programming and Scripting Echo a colored text with tabs Post 302946850 by erin00 on Saturday 13th of June 2015 12:22:48 AM
Old 06-13-2015
Echo a colored text with tabs

I have the line below to echo values with tab between them. The text is also colored, however, some\t does not work.

The output of this one below will have the first two \t not working.
Code:
echo "\033[1;31m${var[a]}\t$time\t$end\t$day\t$score\033[m"

This one below will have all the \t working but will also print -e in the screen.
Code:
echo -e "\033[1;31m${var[a]}\t$time\t$end\t$day\t$score\033[m"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

blink / flash echo text in a menu

I have a ksh script that is a login menu for my end users. I would like to have one line of the welcome message flash when there is a system notice about an impending outage. The welcome message is a series of echo statements which prints a text file "msg of the day" with the status msg. I tried... (1 Reply)
Discussion started by: MizzGail
1 Replies

2. UNIX for Dummies Questions & Answers

is it possible to echo 'some text' every 10 minutes on my screen

is it possible to echo 'some text' every 10 minutes on my screen continues , without cron. (1 Reply)
Discussion started by: vkandati
1 Replies

3. Shell Programming and Scripting

sh: Inserting tabs and moving text to 1 line

I trying to extract certain text from a csv file and then placing it into another csv file, but having problems getting the data to placed in one line with tab separated fields. Basically would like to have text sent to interfaces.csv in one line seperated by tabs. As it currently places files... (6 Replies)
Discussion started by: 00000008
6 Replies

4. Shell Programming and Scripting

Insert Tabs / Indent text

Hi, i need replace the slash (/) with a newline (\n) and a tab (\t). With 'find -type f' in a folder i got this output: ./1999/01/file1 ./1999/01/file2 ./1999/02/file1 ./2000/04/file1 ./2000/04/file2 ./2000/04/file3 ./2000/04/file4 ./2000/06/file1 ./2000/06/file2 ./2000/06/file3... (8 Replies)
Discussion started by: Tonda
8 Replies

5. Shell Programming and Scripting

Help with replacing tabs inside "" with some text/blank

I am poor with scripting;) I have a file in the following format; 'This is a "test in production" of importance.' I want to get rid of the spaces inside the "" part only to get the output as, 'This is a "testinproduction" of importance.' (1 Reply)
Discussion started by: shmathew
1 Replies

6. Shell Programming and Scripting

Echo Variables and Text

I've been trying to get the syntax right so I can echo a $var and then text around it or after it. It either wont display text or $var or one overwrites the other at the beginning of the line. Trying to do something like this. var=1 echo $var"+1.1" #output expected 1+1.1 Its an older... (3 Replies)
Discussion started by: Grizzly
3 Replies

7. Shell Programming and Scripting

Problem using echo command for text starting with /

Hi, i need to print following text using echo: /abc dir/c\ so i tried echo "/abc dir/c\ But it gives me error of Incorrect usage, i am using Hamilton cshell in windows Vista. Can any one please help me. Thanks in advance Sarbjit (3 Replies)
Discussion started by: sarbjit
3 Replies

8. Shell Programming and Scripting

Echo variable contents into a text file...

Hi all, I am trying to create a script to read my Windows UUIDs and create mounts in fstab. I know there are different and maybe even better ways to mount Windows partitions at boot time, but I always manually create them in fstab successfully. I do a clean install of Ubuntu often and would like to... (2 Replies)
Discussion started by: Ian Pride
2 Replies

9. Shell Programming and Scripting

Using echo, grep and wc and outputing to text file

My current line command is as follows: echo -n "text: " ; grep "blah text" ../dir1/filename | wc -l The output to the screen is as needed, but how do I print to a text file? (9 Replies)
Discussion started by: ncwxpanther
9 Replies

10. UNIX for Beginners Questions & Answers

Change text color from echo command?

I have a bash script that starts and stops a game among other things through in.fifo and out.fifo In game the text comes out gray . Kinda hard to see in game window . I would like to change it to purple and maybe capitalize it. #!/bin/bash #nwservctl.sh cd... (5 Replies)
Discussion started by: 222222quick
5 Replies
XmTabListReplacePositions(library call) 								   XmTabListReplacePositions(library call)

NAME
XmTabListReplacePositions -- A convenience function that creates a new tab list with replacement tabs SYNOPSIS
#include <Xm/Xm.h> XmTabList XmTabListReplacePositions( XmTabList oldlist, Cardinal *position_list, XmTab *tabs, Cardinal tab_count); DESCRIPTION
XmTabListReplacePositions creates a new tab list that contains the contents of oldlist, but with the tabs at the positions in position_list replaced with copies of the corresponding tabs in tabs. A warning message is displayed if a specified position is invalid; for example, if the value is a number greater than the number of tabs in the tab list. This function deallocates the original tab list after extracting the required information. It is the caller's responsibility to free the tabs in tabs by using the XmTabFree function. oldlist Specifies the tab list. The function deallocates the tab list after extracting the required information. position_list Specifies an array of positions of the tabs to be replaced. The position of the first tab is 0 (zero), the position of the second tab is 1, and so on. tabs Specifies an array of the replacement tabs. tab_count Specifies the number of elements in position_list and tabs. RETURN
If tabs, oldlist, or position_list is NULL, or tab_count is 0 (zero), returns oldlist. Otherwise, this function returns the new tab list. The function allocates space to hold the returned tab list. The application is responsible for managing the allocated space. The applica- tion can recover the allocated space by calling XmTabListFree. RELATED
XmTabList(3). XmTabListReplacePositions(library call)
All times are GMT -4. The time now is 11:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy