6
I am trying to get the directory where my script is in by using:
scriptdir=`dirname $0`
but this gives me the following error:
dirname: invalid option -- 'b'
Try `dirname --help' for more information.
and I tried what they recommended (i.e dirname --help
) and it said command not found. How can I fix this problem?
I am trying to use the scriptdir variable so I can compile the following java program:
java -mx800m -cp "$scriptdir/*" edu.stanford.nlp.parser.lexparser.LexicalizedParser -retainTmpSubcategories -outputFormat "typedDependencies" -outputFormatOptions "basicDependecies" edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz ./sentences/100000.txt > ./parsedsentences/100000.txt
@Blapy No it didn't work but thanks for trying. – kolonel – 2014-01-28T06:07:47.367
I added another option to my answer. – Biapy – 2014-01-28T06:11:21.360
$0 is '-bash' (ie. a login shell) – Ricky Beam – 2014-01-28T07:15:55.677
bash ~ $scriptdir="$(command dirname "${0}")" dirname: opción inválida -- 'b' Try 'dirname --help' for more information. bash ~ $
– GnP – 2014-01-31T20:29:22.427