task_boiler
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
task_boiler [2022/08/11 21:19] – raju | task_boiler [2024/01/22 22:50] – raju | ||
---|---|---|---|
Line 4: | Line 4: | ||
Start the first heading with " | Start the first heading with " | ||
- | ===== apply unix commands to all but the first line ===== | + | ===== Issue ==== |
- | ==== Situation ==== | + | barrons.com is giving |
- | Let's say we want to sort a series of numbers in descending order but keep the header at the top. For example, given | + | |
< | < | ||
- | $ echo -e " | + | You have been blocked. |
- | value | + | |
- | 8 | + | |
- | 2 | + | |
- | 6 | + | |
- | 3 | + | |
- | </ | + | |
- | we want to output | + | |
- | < | + | |
- | value | + | |
- | 2 | + | |
- | 3 | + | |
- | 6 | + | |
- | 8 | + | |
- | </ | + | |
- | We can't directly use ' | + | Why? |
- | < | + | Something about the behaviour of the browser has caught our |
- | $ echo -e " | + | attention. |
- | 2 | + | |
- | 3 | + | |
- | 6 | + | |
- | 8 | + | |
- | value | + | |
- | </ | + | |
- | ==== simple solution ==== | + | There are various possible explanations for this: |
- | Create a script called ' | + | * You are browsing |
- | < | + | expected of a human being. |
- | # | + | * Something is preventing JavaScript from working on your |
- | # | + | |
- | # body: apply expression to all but the first line. | + | * There is a robot on the same network (IP WW.XX.YY.ZZ) as you. |
- | # Use multiple times in case the header spans more than one line. | + | |
- | # | + | Having problems accessing |
- | # Example usage: | + | ID: a-b-c-d-e |
- | # $ echo -e " | + | |
- | # | + | |
- | IFS= read -r header | + | |
- | printf ' | + | |
- | " | + | |
</ | </ | ||
- | |||
- | Give it exec |
task_boiler.txt · Last modified: 2024/01/23 22:55 by raju