I'm attempting to run TreeTagger using the French parameter file but I am getting a permission denied error with the french-utf8.par file
[bash]:echo cmd/tree-tagger-french-utf8 | lib/french-utf8.par
[bash]:lib/french-utf8.par: Permission denied
This is quite similar to this question here (TreeTagger installation successful but cannot open .par file), but I'm able to run the tagger like this:
[bash]: echo 'Bonjour' | cmd/tree-tagger-french-utf8
reading parameters ...
tagging ...
Bonjour NOM bonjour
finished.
I've tried changing to echo bin/tree-tagger, but I get the same error. Any ideas on what I am doing wrong?
echo cmd/tree-tagger-french-utf8 will print the string cmd/tree-tagger-french-utf8 and you're piping that to a par file. That cannot work, you need to pipe a file to a command, like in your second example but using cat filename (instead of echo 'Bonjour') if you want to feed a file to the TreeTagger.
Thats strange, I know this may seem obvious but have you tried running that command as sudo?
The "Permission Denied" hints that there is some permission problem.
Related
I tried to start with Gearman. After downloading and setting it, gearman_version() works. But, when I start server and try to init worker like so:
php myFileName.php &
I see the code:
And when I init the client, I see code too. What am I doing wrong?
i don`t know why, but the examples from youtube was not correct in my case. The first scripts, which worked I get from http://php.net/manual/ru/gearman.examples-reverse-bg.php
You likely have short open tags disabled on your install. Notice, running a php file that doesn't actually contain any PHP will just echo the contents of the file.
>$ echo 'hello' > text.php
>$ php text.php
hello
>$
You can verify the setting for your install with the following
>$ php -i | grep "short_open_tag"
short_open_tag => On => On
If tags are On you're all set.
I have a strange problem that I didn't able to find solution for it:
When I login to my environment it configured to work with tcsh (I want to keep it like that), but when I edit the file ".tcshrc" and put the below code (Only these 2 lines), the text is printed correctly in RED, but after that the "less" command is not working anymore.
When I remove this line, less command works properly.
#!/bin/tcsh
echo "THIS LINE IS OK"
Does someone knows what could be the reason? I'm using less version: (less 436)
I create a text file: "dummy.txt" and write the following text inside: "THIS IS A DUMMY FILE"
CMD: cat dummy.txt
OUTPUT:
THIS IS A DUMMY FILE
CMD: less dummy.txt
OUTPUT:
THIS LINE IS OK
dummy.txt (END)
Only less command is not working, other commands: cat, more, vi are working properly.
Thanks in advance to the once who try to assist.
Ok, I found the issue, it is well explained in the following link:
http://www.greenwoodsoftware.com/less/faq.html#profileout
I have moved my code to ".login" instead.
Ok, here I'm again, struggling with ssh. I'm trying to retrieve some data from remote log file based on tokens. I'm trying to pass multiple tokens in egrep command via ssh:
IFS=$'\n'
commentsArray=($(ssh $sourceUser#$sourceHost "$(egrep "$v" /$INSTALL_DIR/$PROP_BUNDLE.log)"))
echo ${commentsArray[0]}
echo ${commentsArray[1]}
commax=${#commentsArray[#]}
echo $commax
where $v is something like below but it's length is dynamic. Meaning it can have many file names seperated by pipe.
UserComments/propagateBundle-2013-10-22--07:05:37.jar|UserComments/propagateBundle-2013-10-22--07:03:57.jar
The output which I get is:
oracle#172.18.12.42's password:
bash: UserComments/propagateBundle-2013-10-22--07:03:57.jar/New: No such file or directory
bash: line 1: UserComments/propagateBundle-2013-10-22--07:05:37.jar/nouserinput: No such file or directory
0
Thing worth noting is that my log file data has spaces in it. So, in the code piece I've given, the actual comments which I want to extract start after the jar file name like : UserComments/propagateBundle-2013-10-22--07:03:57.jar/
The actual comments are 'New Life Starts here' but the logs show that we are actually getting it till 'New' and then it breaks at space. I tried giving IFS but of no use. Probably I need to give it on remote but I don't know how should I do that.
Any help?
Your command is trying to run the egrep "$v" /$INSTALL_DIR/$PROP_BUNDLE.log on the local machine, and pass the result of that as the command to run via SSH.
I suspect that you meant for that command to be run on the remote machine. Remove the inner $() to get that to happen (and fix the quoting):
commentsArray=($(ssh $sourceUser#$sourceHost "egrep '$v' '/$INSTALL_DIR/$PROP_BUNDLE.log'"))
You should use fgrep to avoid regex special interpretation from your input:
commentsArray=($(ssh $sourceUser#$sourceHost "$(fgrep "$v" /$INSTALL_DIR/$PROP_BUNDLE.log)"))
I'm trying to use inliner command line tool locally to combine some files. But I get the following error message in the console.
path.existsSync is now called `fs.existsSync`
So i went into /usr/local/lib/node_modules/inliner/bin/inliner and changed line 65 from:
if (path.existsSync(url))
to
if (fs.existsSync(url))
but I get still the same error message. Can anybody give me a hint what is wrong and how I can fix this?
There is already a question here but that didn't fix my problem. Or am I editing the wrong file?
Cheers
:fab
I got inliner working by using the -i command
#-i, --images don't encode images - keeps files size small, but more requests
inliner -i http://fabiantheblind.info/coding.html > test2.html
I have a script which redirects std out/std err as below:
SCRIPTS=/test/scripts
LOG=/test/log
echo $SCRIPTS
echo $LOG
$SCRIPTS/dmm_algo_ofac_daily_sched.ksh >> $LOG/test12.log 2>&1
This script is not able to expand $SCRIPTS and $LOG
If I replace it as below:
/test/scripts/daily_sched.ksh >> /test/log/test12.log 2>&1
It complains as below:
: bad file unit numberd/test.ksh: line 33: 1
Also I am not able to invoke the script from the directory where it is saved. If I do
./test.ksh it gives me error saying file not found. I am able to execute it via ksh /test/sched/test.ksh though.
Can someone help me with these. Thanks in advance.
I'm almost certain that the problem is because of DOS/Windows line endings
The error message you are getting is overwriting itself because of a carriage return. You can fix your file using dos2unix.
Add magic #!/bin/ksh to the first line to invoke directly without naming the interpreter on the command line.
I'll conjecture wildly that your root cause(s) has (have) nothing to do with redirection.
Is the script you've exhibited /test/sched/test.ksh or /test/scripts/test.ksh? Are you certain?