How to append a file in sdb shell
This article mainly explains the "how to write files in sdb shell", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to write files in sdb shell" bar!
[problem description]
Is it possible to append existing files in sdb shell?
[solution]
1. You can use seek to offset an existing file to a certain location, and use write to start writing from the offset, such as:
Var file = new File ("/ opt/text.txt") / / Open the file
File.seek (0 file pointer') / / indicates that the current pointer is to the end of the file
File.write ("test") / / indicates that "test" is written from the end of the file
File.close / / to save
2. Seek (offset,where), offset: the offset of the file pointer in bytes; where: specifies the location where the calculation begins. The values of where:'b','c', and 'eBay, respectively, represent Begin Current End.
3. In sdb shell, you can use the help method to view related usage, such as: new File ("/ opt/text.txt") .help ()
Thank you for your reading, these are the contents of "how to write additional documents in sdb shell". After the study of this article, I believe you have a deeper understanding of how to write additional documents in sdb shell, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!