0

I have the following script, which manipulates a string.

    #!/bin/bash

diry=$( find . -iname "cassandra.yaml" -exec dirname {} + )

dirgo=${diry:2}

echo $dirgo

cd $dirgo

this is the result:

cassandra@server:~$ pwd
/opt/cassandra
cassandra@server:~$ ./yaml.sh 
conf
cassandra@cads2001:~$ pwd
/opt/cassandra

Prints the directory, But it does not go into the directory.

Maybe i need another kind of variable.

regards.

ymk369
  • 51
  • 1
  • 8

0 Answers0