Why does not work a cd in a shell schript file.
How do you get to run it?
I use these code:
#!/bin/sh
cd workspace
array=($(ls -d */))
echo ${array}
But it doesn't change to workspace
editby bakunin: please user CODE-tags as required by the rules. Thank you. (12 Replies)
Hi i am a newbie, and have trying something that looked easy at first sight.
in this script i want to delete all the files and directories in subdirectory1 (but not delete subdirectory1) and dont show any stderr or stdout messages:
i try this but the stderr and stdout is shown...and it says... (2 Replies)
Hi,
I am trying to do the following thing
var='date'
$var
Above command substitutes date for and in turn runs the date command and i am getting the todays date value.
I am trying to do the same thing as following, but facing some problems,
unique_host_pro="sed -e ' /#/d'... (3 Replies)
consider this is a line A#B#C#D#E#F#G#H
note the delimeter is #
i want to cut or spilt in to fields using the delimeter # and to store in an array.
like this
array=A
array=B
array=C
array=D
array=E
and the array content should be displayed.
echo "${array}"
echo "${array}"... (5 Replies)
hi experts,
very need help about script how to login into oracle database and select a table and append the query into a file.
i have oracle database and have a table named omc_ip with fields like host_id(varchar2(20)),ip(varchar2(10)) and update_date(date).
i want to build a script that... (15 Replies)