awk find string and do i blue color


 
Thread Tools Search this Thread
Top Forums Programming awk find string and do i blue color
# 8  
Old 05-18-2012
what is mean by destroy the columns and rows ?

try this...

Code:
awk 'BEGIN{print "<html><body><pre>"}/report/{$0="<font color=blue>"$0"</font>"}END{print "</pre></body></html>"}1' file.txt

# 9  
Old 05-18-2012
THANK U!!
That was the solutions!

Thank u veryyy much!!!!
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk find which column contains string

i want to search columns in a variable and any column contains a particular string, i want to print the value of that column $ echo "${USEDMEMORY}" memTotalReal=3925908 memAvailReal=1109812 memBuffer=242676 memCached=641628 $ $ echo "${USEDMEMORY}" | awk '/memAvailReal/' so what im trying... (6 Replies)
Discussion started by: SkySmart
6 Replies

2. Shell Programming and Scripting

awk find and print next string

Can I do this in one awk session. Solution I have is poor. I want to return the number after PID. echo "Start: 12345 is used by PID:11111 username" | awk -F: '{print $3}' | awk '{print $1}' (6 Replies)
Discussion started by: u20sr
6 Replies

3. Shell Programming and Scripting

awk - find number in string

I am trying to go through a file that has a few million lines. I want to only pull lines that contain a number anywhere in the ninth field, but it has to be after a "/" character. Here is my awk: awk -F\| '$9 ~ /\/*{1,}*/ {print $0}' file1 > file2 However, it is just printing out every... (3 Replies)
Discussion started by: dagamier
3 Replies

4. Shell Programming and Scripting

Awk - find string, search lines below string for other strings

What's the easiest way to search a file for a specific string and then look for other instances after that? I want to search for all Virtual Hosts and print out the Server Name and Document Root (if it has that info), while discarding the rest of the info. Basically my file looks like this: ...... (6 Replies)
Discussion started by: Mbohmer
6 Replies

5. Shell Programming and Scripting

awk - find first instance of string after NR==10

How do I use awk to find the NR of first instance of a specific string after eg NR==10? I need to find the first instance of the word "class" after a specific NR. (2 Replies)
Discussion started by: locoroco
2 Replies

6. UNIX for Dummies Questions & Answers

AWK...find a string ,if so print it

Hi, I need to find a string, if it finds then I need to print it , otherwise it has to goto next line.... input is====> uid = shashi, india uid ,uid= asia uid= none, uid=india. none ========== output shold be uid = shashi, india uid , uid= asia uid= none, uid=india. none ... (1 Reply)
Discussion started by: hegdeshashi
1 Replies
Login or Register to Ask a Question