- This topic has 3 replies, 2 voices, and was last updated Jan 17-3:31 pm by to-the-moon.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Forum for users of antiX Linux. Mean and Lean and Proudly anti-fascist.
Tagged: sed
hey i need a sed command to take all text from file1 line1 and place the text at the end of file2 line1 – targets are bothe from file to file
EXAMPLE-FILE-1-LINE-1
1000
EXAMPLE-FILE-2 BEFORE PATCH LINE 1
127.0.0.1:
EXAMPLE-FILE-2 AFTRER PATCH LINE 1
127.0.0.1:1000
please help
line1=$(head -n1 f1)
sed -i "\$s/$/$line1/" f2
This assumes the last line of f1 does not contain special characters like “/”. If it does or might then those need to “escaped” between the two lines above.
Context is worth 80 IQ points -- Alan Kay
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |