Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to compare strings in zsh script

#!/bin/sh

argn=$#
i=0

for arg do
   shift
   i=$(( i + 1 ))

   if [ "$i" -lt "$argn" ]; then
       set -- "$@" ssh -t "$arg"
   else
       set -- "$@" "/pathtofile/$arg/log.log"
   fi
done

command "$@"
Comment

PREVIOUS NEXT
Code Example
Shell :: source vimrc from the web 
Shell :: react native setup ubuntu 20.04 
Shell :: install zeo 
Shell :: centos who connected to server 
Shell :: ros 20.04 
Shell :: gastby yarn install 
Shell :: kubernetes using hyper v 
Shell :: how to look the usb free space in linux command line 
Shell :: ubuntu files are in read mode onlu 
Shell :: telnet in shell script 
Shell :: linux hide mounted drives from favourites 
Shell :: cmd concatenate files 
Shell :: linux how to run executable in background $ 
Shell :: installing drive in jupyter lab 
Shell :: How to view unit file content with systemctl command 
Shell :: powershell task scheduler 
Shell :: mac error cannot find ghostscript lobraries 
Shell :: count the number of words in a file 
Shell :: Ubuntu software in 22.04 store does not use system theme 
Shell :: how to download octave in ubuntu 
Shell :: what is the command to move the cursor to the start of the current line in vi 
Shell :: switching branch in git 
Shell :: gdal_translate kmz transparent nodata 
Shell :: docker save current state 
Shell :: Target Packages (main 
Shell :: how will you clone the following git repository using git cli? 
Shell :: Jager setup on Docker 
Shell :: dhcp handshake 
Shell :: ex: push a new local repository to github 
Shell :: Install GIMP Ubuntu 18.04 terminal 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =