Hello:
I have the following HTML table:
I would like to add a button with an event to every <td> element with a code, like the following:
Note that I'm not asking how to parse the HTML. Instead, I would like to know how to replace every \t\t\t<td>x</td> line by \t\t\t<td><button onclick="reset(x)">x</button></td>, where x is the code number.
I need to do it with a command-line text editor without input from the user, because I have many files like this one and my idea is to edit all of them using find with the -exec option.
This would be a simple task with ex or ed if I just had to replace the same concurrence. But in this case, I need to keep the code in every replacement. That's what I'm struggling with. I'm afraid I'll need advanced tools like awk and I honestly don't know how to do it.
How can I add the button with the event to the table cells?
Thanks in advance.
Greetings,
I have a file: hostnames.txt which has -
# cat hostnames.txt
machine1
machine2
I need the output to be saved to a variable as:
HOSTNAMELIST=machine1,machine2
Please advise.
Thanks,
Chiru (3 Replies)
Hi,
Is there a way to use cp in such a way that when a file is copied to a destination, the required destination folders are automatically created with the proper permissions, and the resulting copied file has the same attributes as the original. For example if I copied... (1 Reply)
Hi Guys
I need to have a shell script which reads a log file and insert a part of each line into the database. Some sample lines in the file are as below.
20091112091359 MED_RQACK : user_data=60173054304,100232120,20091112091359,;ask_status=0;ask_reason=OK;msg_id=20091112091319... (5 Replies)
Hello,
I'm wondering where I could go to learn how to edit file sections that cross multiple lines. I'm wanting to write scripts that will add Gnome menu entries for all users on a system for scripts I write, etc. I can search an replace simple examples with sed, but this seems more complex.
... (8 Replies)
Hi Forum.
I've tried to search online for a solution but I cannot seem to find one.
Hopefully, someone here can help me out. I would appreciate it.
Input file abc.txt:
$InputFile_Borrower=CMTSLST\EDW_COMMERCIAL_MTGE_BORROWER_dat.lst... (14 Replies)
Greetings,
I am using tcsh to write a script that will replace the numbers in a file with a single number, the caveat is that this file has blank lines which are necessary for another step down the line so I need to preserve the blank lines. I have tried sed and awk but both will collapse the... (1 Reply)
Hi all,
I need to write an automated bash shell script which performs such operations:
1. Grep the header of everyline with the initial of "T" in "FILE_A"
2. Perform a for loop,
Count the numbers of comma in the line of code,
if (no. of comma < 17)
ADD the comma until 17;
... (2 Replies)
Hi,
I lack the utter fundamentals on how to craft an awk script.
I have hundreds of text files that were mangled by .doc format so all the lines are broken up so I need to join all of the lines of text into a single line. Normally I use vim command "ggVGJ" to join all lines but with so many... (3 Replies)
Hi
I have a file with the following structure
"VATTENFALL GLOBAL" "Vattenfall Tray"
"BARCLAYS BANK LONDON" "Capula"
"P1 AGEAS GLOBAL COMPANY" "AAC - Optiver"
The requirement is like this
1) Take 2 input... (16 Replies)
Hi,
I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this:
Name =A
xxxxxx
yyyyyy
zzzzzz
aaaaaa
bbbbbb
Value = 57
This is necessary because in a file there are written more lines which... (6 Replies)
Discussion started by: wenclu
6 Replies
LEARN ABOUT DEBIAN
cw
CW(7) Miscellaneous Information Manual CW(7)NAME
CW - the international Morse code
DESCRIPTION
CW is an abbreviation for "continuous wave", the commonly used technical term for Morse code communication. A basic knowledge or under-
standing of Morse code is a requirement for Radio Amateurs and Marine Radio Operators in many parts of the world.
MORSE CODE TIMINGS
In Morse code, a dot or dash is referred to as an element. The basic timing unit is the dot period. This is the time taken to send a dot,
not including any space before or after the dot. The lengths of all other elements are then derived from this basic unit, using the fol-
lowing rules:
The duration of a dash is three dots.
The time between each element (dot or dash) is one dot length.
The space between characters is three dot lengths.
The space between words is seven dot lengths.
The following formula calculates the dot period in microseconds from the Morse code speed in words per minute:
dot period = ( 1200000 / speed )
This formula arises from the use of the word PARIS as a 'standard' word for calibrating Morse code speed. PARIS is 50 units long when sent
in Morse code. Analysis of English plain-text indicates that the average word is 50 units, including spaces.
MORSE CODE CHARACTERS
The following list shows the IS0 8859-1 (Latin-1) characters that have commonly understood representations in Morse code:
ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"$()+-./:;=?_@ and space
In addition, following ISO 8859-1 and ISO 8859-2 accented characters are also part of the generally accepted international Morse code:
UACOEEANS (S with cedilla), (Z with caron/hacek),
Finally, libcw adds the following ASCII characters as extensions to single character procedural signals:
<>!&^~
MORSE CODE CHARACTER TABLES
The following table shows the Morse code equivalents for the ISO 8859-1, accented ISO 8859-1, and accented ISO 8859-2 characters above.
The ASCII portion of this table is taken from the ARRL Handbook, and the accented extensions from various other sources:
Ch Code Ch Code Ch Code Ch Code
-------------------------------------------------------
A .- B -... C -.-. D -..
E . F ..-. G --. H ....
I .. J .--- K -.- L .-..
M -- N -. O --- P .--.
Q --.- R .-. S ... T -
U ..- V ...- W .-- X -..-
Y -.-- Z --..
0 ----- 1 .---- 2 ..--- 3 ...--
4 ....- 5 ..... 6 -.... 7 --...
8 ---.. 9 ----.
" .-..-. ' .----. $ ...-..- ( -.--.
) -.--.- + .-.-. , --..-- - -....-
. .-.-.- / -..-. : ---... ; -.-.-.
= -...- ? ..--.. _ ..--.-
Ch Code Ch Code
-------------------------------------------------
U ..-- A .-.-
C -.-.. O ---.
E ..-.. A .-..-
A .--.- N --.--
S (S+cedilla) ---- (Z+caron/hacek) --..-
In addition to the above standard characters, the following characters are conventionally used for punctuation and procedural signals as
follows:
Ch Code Ch Code Ch Code Ch Code
-------------------------------------------------------
" .-..-. ' .----. $ ...-..- ( -.--.
) -.--.- + .-.-. , --..-- - -....-
. .-.-.- / -..-. : ---... ; -.-.-.
= -...- ? ..--.. _ ..--.- @ .--.-.
and the following are non-conventional extensions implemented by libcw:
Ch Code Ch Code Ch Code Ch Code
-----------------------------------------------------
< ...-.- > -...-.- ! ...-. & .-...
^ -.-.- ~ .-.-..
An alternative view of punctuation and procedural signals is as combination Morse characters:
Ch Prosig Ch Prosig Ch Prosig Ch Prosig
---------------------------------------------------------
" [AF] ' [WG] $ [SX] ( [KN]
) [KK] + [AR] , [MIM] - [DU]
. [AAA] / [DN] : [OS] ; [KR]
= [BT] ? [IMI] _ [IQ] @ [AC]
< [VA],[SK] > [BK] ! [SN] & [AS]
^ [KA] ~ [AL]
NOTES
Despite the fact that this manual page constantly and consistently refers to Morse code elements as dots and dashes, DO NOT think in these
terms when trying to learn Morse code. Always think of them as 'dit's and 'dah's.
SEE ALSO
Man pages for libcw(3,LOCAL), cw(1,LOCAL), cwgen(1,LOCAL), cwcp(1,LOCAL), and xcwcp(1,LOCAL).
CW Tutor Package CW(7)