How to print the first array element?
Answer / Sandeep Gupta
To print the first element of an array in a shell script, you can use the following command:n```bashnarray=("one" "two" "three")necho ${array[0]}n``
| Is This Answer Correct ? | 0 Yes | 0 No |
What does echo mean in scripting?
Explain about return code?
A file has multiple records each having three 30-bit long fields(field1,field2,field3).There is also a lookup file,LOOK_UP.dat.Now, we need to consider only the last ten digits of field1 and lookup the file LOOK_UP.dat. If there a match then field2 and field3 should replaced with corresponding data from the lookup file. otherwise that particular record,for which there is no match, should be stored in a seperate file.
What will happen to my current process when I execute a command using exec?
Explain about sourcing commands?
In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?
What is the lifespan of a variable inside a shell script?
I want to read all input to the command from file1 direct all output to file2 and error to file 3, how can I achieve this?
I Forgot My Windows Vista Password! How Can I Find My Windows Lost Password?
What is the best shell scripting language?
how to find weblogic version through linux cammand
What are filters explain sort with all the options available?