LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Search Forums
User Name
Password

Notices


Showing results 1 to 6 of 6
Search took 0.01 seconds.
Search: Posts Made By: Linux_Kidd
Forum: Programming 03-06-2024, 09:37 AM
Replies: 13
Views: 331
Posted By Linux_Kidd
With some logging and looking, found my err. ...

With some logging and looking, found my err.

There were no errors from commands.
Turns out one of my sed commands was doing what it said it should do, which was not what I needed it to do.
I...
Forum: Programming 03-06-2024, 09:32 AM
Replies: 13
Views: 331
Posted By Linux_Kidd
▐ :) ▐ Yeah, but let me tell you why it...


:)


Yeah, but let me tell you why it sucks. I had that salary for past 20yrs, and I have been with only a few companies over that period, and I have advanced my skillsets and have made...
Forum: Programming 03-06-2024, 07:24 AM
Replies: 13
Views: 331
Posted By Linux_Kidd
With the backslash before < and > , it has no...

With the backslash before < and > , it has no effect, at least not on cli. I did not try w/o backslash in script, but will try that.


Yeah, that's next step. It's just odd it works 100% from cli,...
Forum: Programming 03-05-2024, 06:08 PM
Replies: 13
Views: 331
Posted By Linux_Kidd
The pattern match should be a literal...

The pattern match should be a literal <permissions> , that's a tag in XML I need to append after.

Running it from cli I end up with
<permissions>
<!-- START -->
<!-- END -->
Forum: Programming 03-05-2024, 05:04 PM
Replies: 13
Views: 331
Posted By Linux_Kidd
script #! /system/bin/bash sed -i -e...

script
#! /system/bin/bash

sed -i -e "/\<permissions\>/a \<\!-- START -->\n\<\!-- END --\>" myfile

I escaped < > and ! with backslash , without that it seemed to have issue on cli

It's...
Forum: Programming 03-05-2024, 03:39 PM
Replies: 13
Views: 331
Posted By Linux_Kidd
sed not working in bash script

This line works from bash shell cli.
GNU bash, version 5.0.0(1)

But not if I place it into a bash script.

In cli is does just that, adds START END after permissions tag
In script, nothing...
Showing results 1 to 6 of 6

 

Didn't find what you're looking for? Try Google:


  



All times are GMT -5. The time now is 02:26 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration