Lateo.net - Flux RSS en pagaille (pour en ajouter : @ moi)

🔒
❌ À propos de FreshRSS
Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.
☐ ☆ ✇ nixCraft

How to sed remove last character from each line

Par : Vivek Gite — 27 avril 2020 à 21:08

I need to remove the last character from a line and shell variable such as "${_allowed_ips}". For example, each line is as follows in my file:
foo,
bar,
demo,

I need output as follows:
foo
bar
demo
.
How can I use sed to delete the last character?

The post How to sed remove last character from each line appeared first on nixCraft.

☐ ☆ ✇ nixCraft

How to save terminal output to a file under Linux/Unix

Par : Vivek Gite — 19 avril 2020 à 19:47

How do I save the terminal output to a file when using BASH/KSH/CSH/TCSH under Linux, macOS, *BSD or Unix-like operating systems?

The post How to save terminal output to a file under Linux/Unix appeared first on nixCraft.

☐ ☆ ✇ nixCraft

Check if a directory exists in Linux or Unix shell

Par : Vivek Gite — 21 mai 2019 à 07:56

I need to check if a directory exists or not, within a shell script running on Linux or Unix-like system? How do I check if a directory exists in a shell script?

The post Check if a directory exists in Linux or Unix shell appeared first on nixCraft.

☐ ☆ ✇ nixCraft

Bash shell find out if a variable has NULL value OR not

Par : Vivek Gite — 27 décembre 2018 à 10:12

I am a new to shell scripting. How do I check for NULL value in a Linux or Unix shell scripts?

The post Bash shell find out if a variable has NULL value OR not appeared first on nixCraft.

❌