Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement]: CLI "append to file" #2584

Open
1 task done
klein0r opened this issue Jan 16, 2024 · 2 comments
Open
1 task done

[enhancement]: CLI "append to file" #2584

klein0r opened this issue Jan 16, 2024 · 2 comments

Comments

@klein0r
Copy link
Contributor

klein0r commented Jan 16, 2024

No existing issues.

  • There is no existing issue for my request.

Description

At the moment it is possible to upload new files via CLI:

$ iobroker file --help
iobroker file

File management

Commands:
  iobroker file read <iobroker-path-to-read> [<filesystem-path-to-write>]  Read file from iobroker path and optionally write to destination
  iobroker file write <filesystem-path-to-read> <iobroker-path-to-write>   Read file from path and write it to iobroker path
  iobroker file rm <iobroker-path-to-delete>                               Remove file
  iobroker file sync                                                       Sync files

Options:
  --help  Show help  [boolean]

e.g.

mkleine@iobroker:~$ echo "test" > ~/test.txt 
mkleine@iobroker:~$ iobroker file write ~/test.txt 0_userdata.0/test.txt
File "/home/mkleine/test.txt" stored as "test.txt"

But it is not possible to append content to a file (like >> in bash)

Why?

e.g. to append lines to a csv file

How?

iobroker file append "hello;1;2;3" 0_userdata.0/data.csv
@Apollon77
Copy link
Collaborator

Can ylu elaborate more on the usecase for it? Because also append only makes sense for text files

@foxriver76
Copy link
Collaborator

Admin has nice possibilities to modify text files manually for doing stuff programmatically we also have the API. Would of course be possible to add but probably only a handful of people would use this like once^

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

No branches or pull requests

3 participants