Laden...
nixCraft Linux / UNIX Newsletter |
How to repeat a character ‘n’ times in Bash Posted: 04 Jun 2021 03:43 AM PDT Let us say you want to repeat a character such as '-' OR '=' multiple times while writing bash script. Please note that I needed a quick script to work on Linux, macOS, and FreeBSD server to repeat a string/character n times. One simple way to to repeat a string or character n times is simple use the echo command/printf command as follows: echo '------------------------------------' printf '%s\n' '------------------------------------'The post How to repeat a character ‘n’ times in Bash appeared first on nixCraft. |
Shell script too see Time-To-Live (TTL) for a DNS record Posted: 03 Jun 2021 02:14 PM PDT Say you want to see the Time-To-Live (TTL) value for a given DNS record for A, AAAA, and MX. Here is a sample shell script that works on Linux, Unix, and macOS. You must have the bash and dig command installed. |
You are subscribed to email updates from [RSS/Feed] nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
Laden...
Laden...