I'd be very surprised if you get the EXCEL formatting into a plain text file. If you do, please keep me informed!
What you can do is insert terminal/console control chars into your text. See man console_codesExample (use editor of choice):
The ^[ in each "escape sequence" is the <ESC> char (ASCII 27, 0X1B, \033). Try to print above sequence to your terminal and see...
If you choose the Excel route, here is an "untested" example of how to do such using VBA in Excel:
If cell A1 contains the starting point, cell B1 contains the ending proint and the string is in cell C1 (your active cell), then underline that range. There is a bit more to it then that but that's for another forum.
Sorry for misleading.
I should said that I save a file in *.txt format and I used microsoft excel to open the *.txt.
After then, manual underline the region of interest previously.
Do you mind to share more how to underline or bold my content in terminal?
I did try your method, but it seems like can't work.
Maybe I misunderstanding your command
Below is my input file:
Part of long list of Input file
Desired output
"ETRQWTQW" should be underline automatic by your program/script if possible.
Many thanks.
---------- Post updated at 09:44 AM ---------- Previous update was at 09:36 AM ----------
Hi RudiC,
Many thanks for reply.
I have a try by using Ubuntu terminal then.
Thanks a lot.
I will update you once the result is out.
After I try your awk command, it able to shown underline of region interest through terminal.
However when I open those *.txt by Microsoft Excel or Notepad.
It shown some "[4mSFGE[0mE" rather than shown underline at region interested.
My main purpose was hope that able to figure a way or method that able to underline region interest and it able to shown when I open through Microsoft Excel.
You did not mention to use EXCEL in your specification. EXCEL is showing exactly what you put in: the console code to switch underline on, the text, the code to switch ul off.
EXCEL underline and terminal underline are two completely different and incompatible things.
Still you may code a VBA script to turn the console codes to sth EXCEL understands...
How to insert header with underline
AM able to insert only header not underline
sed '1i NAME COUNTRY' test.txt
input file
UK 1234
USA 2354
AUS 2253
IND 4256
Output file
NAME COUNTRY_CODE
---- ------------
UK 1234
USA 2354
AUS 2253
IND 4256 (5 Replies)
Hi,
I have a tab delimited text file from which I want to cut out specific columns. If the second column equals one, I want to cut out columns 1 and 5 and 6. If the second column equals two, I want to cut out columns 1 and 5 and 7. How do I go about doing that? Thanks! (4 Replies)
Hi,
I have the following text file:
8 T1mapping_flip02 ok 128 108 30 1 665000-000008-000001.dcm
9 T1mapping_flip05 ok 128 108 30 1 665000-000009-000001.dcm
10 T1mapping_flip10 ok 128 108 30 1 665000-000010-000001.dcm
11 T1mapping_flip15 ok 128 108 30... (2 Replies)
I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it.
For example, Here is a portion of a zone file.
IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN ... (2 Replies)
I have a script main.shl which has few lines like this
#bold
tput smso
echo "\t\tsome statement\t\t"
tput rmso
I am executing the main.shl from the shell and redirected its output to a separate file like this
$main.shl >main.log 2>&1 &
once after running this script, if I "cat" the... (0 Replies)
I regularly extract lines of text from files based on the presence of a particular keyword; I place the extracted lines into another text file. This takes about 2 hours to complete using the "sort" command then Kate's find & highlight facility.
I've been reading the forum & googling and can find... (4 Replies)
Hi,
I am having trouble converting a text file. I have been working for this whole day now, still i couldn't make it.
Here is how the text file looks:
_______________________________________________________
DEVICE STATUS INFORMATION FOR LOCATION 1:
OPER STATES: Disabled E:Enabled ... (5 Replies)
i want to print underline under a text using shell or awk.can any body help me regarding this problem?
i hav tried with
echo -e -n "\033$4}'
like expected output is
123 456 12
122 567 13
211 087 14
311 987 15
like the avove
Thank you
regards,
Pankaj. (2 Replies)
I want to print a man page for a command in unix, this is what I did
man command > command.txt
but when I view the output file command.txt I found there are lot of _^H characters that in the man page are actually underline character, how can I replace this _^H with underline character?
... (2 Replies)