Sprasad Pujarisprasad.hashnode.devยทMar 29, 2024"Simplify Bash Scripting : Beginner to Pro with 50 Essential Scripts" ๐งโ๐ปHey there! ๐ Ever heard of Bash? It's like the "cool kid" of the command-line world, similar to the Windows Command Prompt (CMD), but with a twist! ๐ If you haven't delved into it yet, you're in for a treat! ๐ Bash is "Simplify Your Life with Bash...Discussยท38 readsbash script
Omkar Venkatrao Punjajicosmicomkar.hashnode.devยทApr 23, 2023if Statements#! /bin/bash #Integers comparison operators #String comparison #{ { = , == , != } ..... [ "$a" = "$b" ] #{ {< , > , -z {for null string , #zero-length string } ..... [[ "$a" < "$b" ]] count=10 if [ $count -eq 10 ] then echo "Number Equal to 10 " fi i...Discussยท31 readsLinux
Omkar Venkatrao Punjajicosmicomkar.hashnode.devยทApr 23, 2023pass Args to bash Script in terminal#! /bin/bash echo "Your Args Variables are: $0 $1 $2 $3" #Pass Args as Array elements: args=("$@") echo "Args Var...: ${args[0]} , ${args[1]} , ${args[2]}" #Prints all args Variables echo $@ #Prints number of argsDiscussยท31 readsLinux
Omkar Venkatrao Punjajicosmicomkar.hashnode.devยทApr 23, 2023read input from user#! /bin/bash echo "Enter your name: " read name echo "Entered name: $name" #multi variables input echo "Enter Names:" read name1 name2 name3 echo "Names are : $name1 , $name2 , $name3" #Take User input on the same line read -p "username:" user_var ec...Discussยท1 likeLinux
Taegu Kangktg0210.hashnode.devยทJan 31, 2023unlimit bash history (feat. ChatGPT 3.5)outline cat /root/.bashrc | grep -E 'HISTSIZE|HISTFILESIZE' # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 unlimit bash history vim .bashrc HISTSIZE= HISTFILESIZE= ChatGPT 3.5 (O)Discusslinux bash