I'm using a .mrc script to add a data output to irc currently I'm outputting like this -----> [iNFO] - 12 / 125M/S. What I would like to do is output like this [iNFO] - 12F / 125M/S, so what I need is to add the "F" after the 12.
Here's the code snippet I use
`scon 19 msg #test [iNFO] - $remove($strip($4),$chr(44)) F / $remove($strip($6),$chr(44))`
As you can see that outputs like this [iNFO] - 12 F / 125M/S so I need to remove the space between the "12" and the "F".
Any help would be greatly appreciated.
Related
Trying to build Bitcoin raw transaction for Bitcoin Testnet in Golang, but when trying to send getting an error:
mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element)
Here is raw transaction:
01000000014071216d4d93d0e3a4d88ca4cae97891bc786e50863cd0efb1f15006e2b0b1d6010000008a4730440220658f619cde3c5c5dc58e42f9625ef71e8279f923af6179a90a0474a286a8b9c60220310b4744fa7830e796bf3c3ed9c8fea9acd6aa2ddd3bc54c4cb176f6c20ec1be0141045128ccd27482b3791228c6c438d0635ebb2fd6e78aa2d51ea70e8be32c9e54daf29c5ee7a3752b5896e5ed3693daf19b57e243cf2dcf27dfe5081cfcf534496affffffff012e1300000000000017a914de05d1320add0221111cf163a9764587c5a171ba8700000000
Tried to debug with btcdeb:
./btcdeb --tx=01000000014071216d4d93d0e3a4d88ca4cae97891bc786e50863cd0efb1f15006e2b0b1d6010000008a4730440220658f619cde3c5c5dc58e42f9625ef71e8279f923af6179a90a0474a286a8b9c60220310b4744fa7830e796bf3c3ed9c8fea9acd6aa2ddd3bc54c4cb176f6c20ec1be0141045128ccd27482b3791228c6c438d0635ebb2fd6e78aa2d51ea70e8be32c9e54daf29c5ee7a3752b5896e5ed3693daf19b57e243cf2dcf27dfe5081cfcf534496affffffff012e1300000000000017a914de05d1320add0221111cf163a9764587c5a171ba8700000000 --txin=02000000000101394187cababd1c18dfc9d30d6325167aa654b1d35505ab77cd1b96562fda5d500000000017160014c0a4f9f451ea319f67c6d2535c1e41bd5d333214feffffff02f009aab80000000017a91455f5b5f3afa4751a54205941a45a14b27ad99be787ec8016000000000017a91435ac960b988964007c167c38ea724e034123e6b1870247304402205d6b22bcaf1a58bc41224eecc7437eef0db9b7e7fb709826314a8bd73adb330702204fbbbd49747d75331a89e2f7b486e0b7a786ecef3229b8e3fec0c4be491921c301210233eab1d60449c393c8f22d4b5d98ee103060d9644dc2af665e607a62e2151bbc30091e00
btcdeb 0.4.21 -- type `./btcdeb -h` for start up options
LOG: sign segwit taproot
notice: btcdeb has gotten quieter; use --verbose if necessary (this message is temporary)
input tx index = 0; tx input vout = 1; value = 1474796
got witness stack of size 0
14 op script loaded. type `help` for usage information
script | stack
-------------------------------------------------------------------+--------
30440220658f619cde3c5c5dc58e42f9625ef71e8279f923af6179a90a0474a... |
045128ccd27482b3791228c6c438d0635ebb2fd6e78aa2d51ea70e8be32c9e5... |
<<< scriptPubKey >>> |
OP_HASH160 |
35ac960b988964007c167c38ea724e034123e6b1 |
OP_EQUAL |
<<< P2SH script >>> |
5128ccd2 |
OP_DEPTH |
OP_SIZE |
OP_NOP4 |
OP_PICK |
28c6c438d0635ebb2fd6e78aa2d51ea70e8b |
OP_UNKNOWN |
#0000 30440220658f619cde3c5c5dc58e42f9625ef71e8279f923af6179a90a0474a286a8b9c60220310b4744fa7830e796bf3c3ed9c8fea9acd6aa2ddd3bc54c4cb176f6c20ec1be01
Can anybody give an advice on where to look at?
Judging from the examples in the btcdeb documentation, you should expect to see a valid script message when starting btcdeb, if the script validates correctly.
btcdeb will still allow you to step through the script with the step command, but because the script is invalid in the first place, this may not tell you much, except that it decides to halt after reaching <<< P2SH script >>>, thinking that is the end of the script.
The most obvious fix should be to remove OP_UNKNOWN, which represents an opcode that was not understood by btcdeb, but there are probably other errors lurking that prevent the script from validating also. You could try removing the end of the script, and building it back up incrementally, testing with the debugger, until it works.
I have a Markdown file for logging. Each section has a heading named by date in chronological order. Part of the file is the following.
## 20200628
- Traceback
- [x] code debug
- [x] read Section 2
## 20200629
- Homepage rebuilding
## 20200630
- 13:00: Meeting Tom
I would like to sort the logs in a reverse way, after which it will show like the following.
## 20200630
- 13:00: Meeting Tom
## 20200629
- Homepage rebuilding
## 20200628
- Traceback
- [x] code debug
- [x] read Section 2
I was expecting to use VIM but I didn't figure out what is a proper way to achieve this. Any suggestions would be appreciated a lot. Thanks in advance.
We capture each block using a regex that matches its start, then
we delete it and paste at the beginning of the file.
:$put _ | g/^## 202006[2-3][890]/normal! dapggP
The :$put _ part was used to add a blank line at the end, so each block has a blank line after it.
: .................... vim command mode
$ .................... at end of the file
_ .................... a blank line
| ................... another vim command
g ................... a global command
/ ................... start of a search
^ ................... every start of the line
## .................. two literal ##
202006 ............... literal numbers
[2-3] ............... followed by 2 until 3
[890] ............... followed by 8 9 or zero
/ .................... end of the search
normal! .............. a normal command
dap .................. delete a paragraph
gg ................... jump to the beginning of the file
P .................... put deleted text before the cursor
I have many log files, like that
log file 1
2016-09-11_19:40:15.537#15437 [INFO] A1
2016-09-11_19:40:15.537#15437 [WARN] A2
2016-09-11_19:40:15.542#15437 [INFO] A3
log file 2
2016-09-11_19:40:15.537#437 [INFO] B1
2016-09-11_19:40:15.540#437 [INFO] B2
I wish I can merge them by script or other method like that
sort by time
2016-09-11_19:40:15.537#15437 [INFO] A1
2016-09-11_19:40:15.537#15437 [WARN] A2
2016-09-11_19:40:15.537#437 [INFO] B1
2016-09-11_19:40:15.540#437 [INFO] B2
2016-09-11_19:40:15.542#15437 [INFO] A3
How do I to merge the files with efficient way ?
thanks !
Ref: Merging multiple log files by date including multilines
As mentioned in the above question, if you are certain that all the log lines start with timestamp, you can do:
cat logA.log logB.log | sort -n
This would not work when there are other lines such as stack trace which do not start with timestamp.
I think you can check out the above question and answers if your considering a similar scenario.
Try rust-based tool Super Speedy Syslog Searcher
(assuming you have rust installed)
cargo install super_speedy_syslog_searcher
then
s4 --color=never /var/log > logs-merged.log
Super Speedy Syslog Searcher will sort varying log messages by datetime.
Insert all of your files to an empty Notepad++ document.
Edit → Line Operations → Sort Lines Lexicographically Ascending.
What's the difference on a mvn dependency-tree output between a '+' and a '\'. It seems fairly arbitrary to me, but I'm sure it's not...
+- com.tom:artifact:pom:6.0.0:compile
| +- com.tom:artifact2:jar:1.0.4:compile
| \- com.tom:artifact3:jar:6.0.0:compile
| \- (com.tom:artifact4:jar:1.0.4:compile - omitted for duplicate)
[I've obviously removed the actual group/artifact ids...]
It's only ASCII-Line-Drawing. It only appears at the bottom line (last leave) of a branch as a kind of a south-west corner.
+- first entry first level
| +- 1.1 second level
| \- 1.2 second level
+- second entry first level
\- last entry first level
It also clarifies that 1.2 second level has nothing to do with second entry first level which otherwise mayby considered connected with the south pin of the plus.
I have around 4 files named:
Test_1.csv
Test_2.csv
...
Each line in each test file has the following format:
method;request
Where, method is the URL that I call and request is the request I make to it. Everything is configured to pick up these values and form URLs.
However, first Test_1.csv must run, then Test_2.csv must run and so on. To do that, I have created 5 thread groups in the following hierarchy:
Test Plan
|
+- Step 1
|
+- HTTP request
+- CSV Data Set Config <- Reads from Test_1.csv
+- Uniform Random Timer
+- Step 2
|
+- HTTP request
+- CSV Data Set Config <- Reads from Test_2.csv
+- Uniform Random Timer
And I have also selected the Run thread groups consecutively option in my test plan. Each thread group is configured for 20 threads. Now, what I want it to do is that, Step 1 should run each and every test in Test_1.csv, then Step 2 should execute and run each and every line in Test_2.csv. However, what is happening is that, Step 1 runs the first 20 lines from Test_1.csv and then Step 2 starts, runs 20 tests and continues. Then, after all steps are done, Step 1 runs again and runs the very same 20 lines from Test1.csv. I want it to just run once, loop through all the lines in the test file and then quit and hand over control to the next thread.
How do I go about this?
Try to use the following schema:
Test Plan
Thread Group #1
Number of Threads: N
. . .
While Controller
Condition: ${__javaScript("${request}"!="<EOF>",)} - until the EOF
CSV Data Set Config
Filename: [path to your file with test-data] - Test_1.csv in this case
Variable Names: method,request
HTTP Request
Uniform Random Timer
. . .
Thread Group #2
. . .
[same for Test_2.csv]
Thread Group #3
. . .
[same for Test_3.csv]
jMeter Plugins' ParameterizedController can help you call parts of your test plan like you call functions in a regular programming language. More importantly, you can parametrise those calls with variables.