how to print the 2-d, 3-d arrays in unix shell script programs
please answer thi questio to my mail venusaikumar@gmail.com



how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail..

Answer / Rashmi Shridher

To print a 2D or 3D array in Unix shell script programs, you can use nested loops for iterating through the array and print each element. Here is an example of printing a 2D array:n
array=(1 2 3 4 5 6 7 8 9 10)nnfor i in {`seq 0 $((${#array[@]}-1))`}; donecho -n "${array[$i]}"nif [[ $i -eq $((${#array[@]}-1)) ]]; then echo; findone

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Shell Script Interview Questions

What is gui scripting?

1 Answers  


What is echo $shell?

1 Answers  


What is c in shell script?

1 Answers  


what do u mean by $#,$* in unix programming?

5 Answers   Convergys, TCS,


How to replace following lines, catch (DAOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } catch (BOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw e; } catch (Exception e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } Needs to be changed in to, catch (DAOException e) { AppException.handleException (null, null, e, null, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); } catch (BOException e) { AppException.handleException (null, null, null, e, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 0); } catch (Exception e) { AppException.handleException (null, null, null, null, null, e, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); }

1 Answers   Wipro,


Why should we use shell scripts?

1 Answers  


Why are shell scripts used?

1 Answers  


Why we are writting shell scripts? Plz if possible explain it briefly.

6 Answers   ITC Infotech,


Explain about sourcing commands?

1 Answers  


Why is shell scripting important?

1 Answers  


What does debug script mean?

1 Answers  


What is the first line of a shell script called?

1 Answers  


Categories