why not reading from script?
2 Attachment(s)
I have put this script (plot)on my desktop as well as some other simple scripts and have given its address to bashrc as below:
Code:
PATH=$PATH:/home/ehsan/Desktop/codes Code:
ehsan@Ehsan-com:~/Desktop/WR_Main_Central$ plot rhoCentralFoam |
Try to use the export command in .bashrc to make the variable global:
Code:
export PATH="$PATH:/home/ehsan/Desktop/codes" |
thanks.
but the error is repeated. Code:
ehsan@Ehsan-com:~/Desktop/WR_Main_Central$ plot rhoCentralFoam |
In the top of your plot script, you have the shebang:
Code:
#! /bin/sh Code:
#!/bin/sh Code:
chmod +x plot |
I removed space.yes its executable.doesn't perform.:confused:
|
Greetings to all!
@Ehsan: What happens if you run the contents of the script directly on the command line? Namely: Code:
pyFoamPlotRunner.py --hardcopy --with-courant --progress --no-pickled-file rhoCentralFoam Bruno |
dear Bruno I have been using that untill now and thought it will be better to do that by a short command and script but it doesn't work.
|
Quote:
Code:
#!/bin/sh Code:
#!/bin/bash Code:
#!/bin/bash Code:
which rhoCentralFoam |
no.which command doesn't work in script but work in terminal:
Code:
ehsan@Ehsan-com:~/Desktop/WR_Main_Central$ plot rhoCentralFoam |
I finally understand what's happening... try running:
Code:
which plot The solution is simple: rename your "plot" script! |
yes that message was shown.then its name is like other script in ubuntu?
but other names don't work: Code:
ehsan@Ehsan-com:~/Desktop/WR_Main_Central$ do rhoCentralFoam |
What does the following command output?
Code:
which runPlot |
it knows the path:
Code:
ehsan@Ehsan-com:~/Desktop/WR_Main_Central$ which runPlot |
OK, then confirm the contents of the file... I don't know what it looks like at this point.
If it all makes sense, try changing the first line to this: Code:
#!/bin/bash -x |
that says this::D
Code:
ehsan@Ehsan-com:~/Desktop/WR_Main_Central$ runPlot rhoCentralFoam |
resolved!
sorry,i had changed a postProceesing function meanwhile and didn't test full pyFoam command it terminal after that change. then it must have been resolved when I had changed its header to Code:
#!/bin/bash but i learned some more things!;) now a simple question how can I set number of processors in line like this: runPlot 4 rhoCentralFoam what should i replace for 4 in this code? : Code:
#!/bin/bash |
Quote:
Code:
#!/bin/bash |
All times are GMT -4. The time now is 07:28. |