8000 How to add a line in between (not at the end)? · Issue #1 · suuhm/s3e.sh · GitHub
[go: up one dir, main page]

Skip to content
< 8000 link rel="modulepreload" href="https://github.githubassets.com/assets/ej-b83f46aa21893807.js" crossorigin="anonymous" />

How to add a line in between (not at the end)? #1

Open

Description

@Disonantemus

How to add a line in the middle of the file (not at the end)?

I've been struggling to add lines within a file using s3e.

Example doing this with sed:

$ seq 3 | sed '2i hello'
1
hello
2
3

There is a way to do this in s3e?

I’ve found that s3e has an option called 1. Add lines, but it only allows adding lines at the end of the file.


PD: I've been testing some POSIX shell scripts to use with adb shell, to edit some markdown files in Android devices. I found out:

  • shfm: A nice minimal file manager.
  • shedit: A nano-like text editor.
  • mel: An ed-like line text editor.

There are some sh text editors that didn't work with adb shell (but do work inside dash), like: alte, poshed.

Activity

  1. suuhm commented on Sep 10, 2025

    @suuhm
    Owner

    Hi there are two ways, actually you can replace or just insert with a new commit i've posted here:

    a592d60

    just try it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0