this post was submitted on 12 Jun 2023
1 points (100.0% liked)

Linux

47323 readers
845 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hello there :)

As far as I know (searched through the web), editing/navigating a multiline in bash is not possible and opening nano, pasting and editing is to much friction I want to get rid off.

Do you have any way to speed up the process?

example of multiline:

echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Thank you :)

top 3 comments
sorted by: hot top controversial new old
[–] 3nt3r@lemmy.world 1 points 1 year ago

Personally if its just a bash command then I dont bother with formatting and just do one-liners. If I want it to look pretty then I’ll put it in a script. If I need to edit something you can use shortcuts like these to jump around the command line to edit whatever you need

[–] gartheom@lemmy.world 1 points 1 year ago

As soon as a bash command gets to multiple lines, i save it as a bash script and then edit it in a text editor.

[–] taaz@lemmy.world 1 points 1 year ago

Ctrl+x Ctrl+e