Shell script – How to display variable names and their values in loop

I am trying to display variable names and their values in a for loop, through a ksh shell script. But I’m not sure how to do that. Should I use something like eval for this? Here is an example script: #!/bin/ksh A=var1 B=var2 C=var3 D=var4 param="" for i in A B C D do param="$param… Read More Shell script – How to display variable names and their values in loop

change of ip address using perl or sed

I’ve an input file that consists of IP Address and subnet masks. As an example, 1.example.com,10.135.10.111,255.255.255.0,some comment 2.example.com,10.135.10.112,255.255.255.0,some comment 3.example.com,10.135.10.113,255.255.255.0,some comment 4.example.com,10.135.10.11,255.255.255.0, some comment 10.135.10.111 A 10.135.10.112 A 10.135.10.113 A 10.135.10.11 A I loop the IP address in my bash script and when using the perl or sed command all .11 gets changed. As an… Read More change of ip address using perl or sed

applying str_split_fixed function simultaneously across multiple columns in r

I have a data frame which is having multiple columns each column is having string values. I want to split column values by coma separator in the output data frame. Input and required output are as below Col1=c("a,b,c","9,a,5") Col2=c("c,b,e","4,r,t") Col3=c("e,f,g","y,z,d") Input=data.frame(Col1,Col2,Col3) Column1=c("a","9") Column2=c("b","a") Column3=c("c","5") Column4=c("c","4") Column5=c("b","r") Column6=c("e","t") Column7=c("e","y") Column8=c("f","z") Column9=c("g","d") Output=data.frame(Column1,Column2,Column3,Column4,Column5,Column6,Column7,Column8,Column9) If anyone know the… Read More applying str_split_fixed function simultaneously across multiple columns in r

How to perform multiple AND statement after THEN Statement

Sub Crons() Dim s1 As Worksheet, s2 As Worksheet Dim check1 As Boolean, check5 As Boolean, check10 As Boolean, flow As Boolean, speed As Boolean, motor_power As Boolean Set s1 = ThisWorkbook.Worksheets(1) Set s2 = ThisWorkbook.Worksheets(2) check1 = s2.CHECKBOXES("Check Box 1").Value = xlOn check5 = s2.CHECKBOXES("Check Box 5").Value = xlOn check10 = s2.CHECKBOXES("Check Box 10").Value… Read More How to perform multiple AND statement after THEN Statement