---
title: "Omkar Venkatrao Punjaji (@CosmicOmkar) | Hashnode"
description: "open source DevOps  , Linux , Data Structure , c, c++, python. Read the latest articles by Omkar Venkatrao Punjaji on Hashnode."
url: "https://hashnode.com/@CosmicOmkar"
---

@CosmicOmkar

# Omkar Venkatrao Punjaji

@CosmicOmkar · india · Joined April 2023

open source DevOps , Linux , Data Structure , c, c++, python

### [Append output end of text file](https://cosmicomkar.hashnode.dev/append-output-end-of-text-file?utm_source=hashnode&utm_medium=feed)

#! /bin/bash echo "-e Enter file name: \\c" read file\_name if \[ -f $file\_name \] then if \[ -w $file\_name \] then echo "type some data to append to the file. To quit press ctrl+d:" cat >> $file\_nameelse echo "File don't have to write permission" fi else ...

1 min read · [cosmicomkar.hashnode.dev](https://cosmicomkar.hashnode.dev/append-output-end-of-text-file?utm_source=hashnode&utm_medium=feed)

[Apr 23, 2023](https://hashnode.com/posts/append-output-end-of-text-file/64455e3bf1d82fe97c384c7c)

### [file test operator](https://cosmicomkar.hashnode.dev/file-test-operator?utm_source=hashnode&utm_medium=feed)

#! /bin/bash echo -e "Enter the name of the file: \\c" # -e flag for /c so the cursor stays on the same line read file\_name if \[ -d $file\_name \] # {-f... for regular file }, {-d ... for directory } # {-c ... for character special file } , { -b ... for...

1 min read · [cosmicomkar.hashnode.dev](https://cosmicomkar.hashnode.dev/file-test-operator?utm_source=hashnode&utm_medium=feed)

[Apr 23, 2023](https://hashnode.com/posts/file-test-operator/64455e0af8c2238cfffbb36e)

### [if Statements](https://cosmicomkar.hashnode.dev/if-statements?utm_source=hashnode&utm_medium=feed)

#! /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...

1 min read · [cosmicomkar.hashnode.dev](https://cosmicomkar.hashnode.dev/if-statements?utm_source=hashnode&utm_medium=feed)

[Apr 23, 2023](https://hashnode.com/posts/if-statements/64455daef8c2238cfffbb368)

### [pass Args to bash Script in terminal](https://cosmicomkar.hashnode.dev/pass-args-to-bash-script-in-terminal?utm_source=hashnode&utm_medium=feed)

#! /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 args

1 min read · [cosmicomkar.hashnode.dev](https://cosmicomkar.hashnode.dev/pass-args-to-bash-script-in-terminal?utm_source=hashnode&utm_medium=feed)

[Apr 23, 2023](https://hashnode.com/posts/pass-args-to-bash-script-in-terminal/64455d362520d42aaf3b0e4f)

### [read input from user](https://cosmicomkar.hashnode.dev/read-input-from-user?utm_source=hashnode&utm_medium=feed)

#! /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...

1 min read · [cosmicomkar.hashnode.dev](https://cosmicomkar.hashnode.dev/read-input-from-user?utm_source=hashnode&utm_medium=feed)

[Apr 23, 2023](https://hashnode.com/posts/read-input-from-user/64455c8319d79dd72da75d9c)
