Thanks for your reply. I was thinking to have an array to manipulate it later and be able to print
its elements in a single line separated by commas as follow.
I've tried to modify a little bit your first code option adding printf() but doesn't join all lines
in a single one as I show above, only merges two consecutive lines as follow.
In addition, how can apply the "flag logic" when I use ranges as I do in my original code.
Doesn't work when I do this:
Thanks in advance.
hi all
need your help.
I am wrting a script that will load data into the table.
then on another load will append the data into the existing table.
Regards
Ankit (1 Reply)
Hi All,
OS-Type=Sun-OS 5.8 Sparc9 Processor
Can I grep the previous 4 lines and next 4 lines of a matched pattern(context grep)?
For example here we need to monitor logs of live traffic.The data obtained from "tail -f LiveTrafficData.log"
looks something like this:-... (3 Replies)
I have files that store multiple data points for the same device "vertically" and include multiple devices. It repeats a consistant pattern of lines where for each line:
Column 1 is a common number for the entire file and all devices in that file
Column 2 is a unique device number
Column 3 is... (7 Replies)
Hello,
Is there any way in awk to put every line of a file in an array and so we can like this print the line we want.
For example, if we have this file
aaa eee
bbb fff
ccc ggg
ddd hhh
So we can print to the output the 3rd line only
ccc ggg
If it is possible, please put the... (7 Replies)
I am trying to add a line to a BASH shell script to print out a large variable length table on a web page. I am very new to this obviously, but I tried this with awk and it prints out every line twice. What I am doing wrong?
echo "1^2^3%4^5^6%7^8^9%" | awk 'BEGIN { RS="%"; FS="^"; } {for (i =... (6 Replies)
Hi Friends,
I have a file1
i want to retrieve only the fields which have DEP,CITY,TRANS as headers in other file.
Output:
I want to give the input as DEP,CITY,TRANS column names to get the output.
i used cut command .. but if i have 300 fileds it is more difficult to... (4 Replies)
Hi all, I'm trying to match the following two files with the code below:
awk -F, 'NR==FNR {a=$0; next} ($12,$4) in a {print $12,$1,a}' OFS="," file4.csv file3.csv
but the code does not print the entire row from file4 in addition to column 12 and 1 of file3.
file4:
o,c,q,co,ov,b... (1 Reply)
Dear all,
I am using the awk 'split' command to get the particular value.
FILE=InputFile_009_0.txt
Temp=$(echo $FILE | awk '{split($FILE, a, "e_"); print a}')
I would like to have the Temp take the value as : _009_0
... (4 Replies)
I have an file which have data in lines as follows
ad, findline=24,an=54,ab=34,av=64,ab=7989,ab65=34,aj=323,ay=34,au=545,ad=5545
ab,abc,an10=23,an2=24,an31=32,findline=00,an33=23,an32=26,an40=45,ac23=5,ac=87,al=76,ad=26... (3 Replies)
Discussion started by: deepKrish
3 Replies
LEARN ABOUT OPENDARWIN
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)