Plink2 "command not found" - terminal

I have been using plink 1.9 before and today downloaded the MacOS 64-bit^2 version of plink2. I made sure that I was in the same directory as where I stored plink2.exec but I still could not get plink2 to operate on terminal. When I input ./plink2 on terminal, the output was a bunch of command introduction for plink2, which was expected, but when I input plink2, it keeps saying "command not found". What am I doing wrong? I have tried searching unfortunately I have yet to see another person with the same problem.

Related

How to feed file input into C program in Xcode

I have a program that I built in Xcode however I need to supply input to the program in the following way as would be done from the Terminal:
./program < fileInput
I followed the steps suggested here Running C scripts with terminal instead of Xcode but no luck.
Below is the screenshot of my attempt. The file I'm providing exists in the Build directory. I also tried supplying the input file as absolute path without any luck either. My xcode version is 8.1.
The screenshot:

realpath couldn't resolve "/usr/bin/-perl" on Mac Terminal

I'm trying to install Tails on my Mac using this instruction guide (https://tails.boum.org/doc/first_steps/installation/manual/mac/index.en.html) and I've been successful up to step 4, sub-step 6 where it says "To run isohybrid.pl on the ISO image, execute the following command, replacing [tails.iso] with the path to the ISO image that you want to install."
Below is my terminal window. I have no idea what a majority of this means and this is actually my first time ever using terminal. I was able to figure out how to check my hidden bin folder through finder and I checked for -perl and I didn't see that file in there. I saw perl, perlbug, perldoc, etc. but no -perl. Also I'm confused as to if this command actually did something because the 'couldn't resolve' message and the '[Process completed]' message seem kind of contradictory. Anyway, if anyone could help me get unstuck, that would be great :)
Here is a screenshot of my terminal window: http://i.stack.imgur.com/Hmc8c.png

Changing behavior in Mac Terminal (e.g. wildcards don't work)

Let me preface this by saying I've read enough to believe this has something to do with the login terminal and .bashprofile, etc. But I don't understand enough about the underpinnings of the Mac terminal to be able to solve this.
When my prompt reads
my-mac:~ [username]$
... where [username] is my login name, I generally type in
cd doc*
to go into my Documents folder. However, occasionally this command doesn't work. For instance right now I am getting the result
bash: cd: doc*: No such file or directory
Even when I close and reopen Terminal, I'm still getting this error. Can someone please help me understand both how to fix this and the root cause of why this happens?

Dia command line not working on OSX

I've got a problem with using Dia from the command line on OSX 10.7.4. I downloaded and installed the OSX dmg from http://dia-installer.de/download/macosx.html I've been using it to create graphics for a paper and absolutely love it.
I'm using a makefile to call pdflatex, bibtex, and R so that that it will build everything from scratch if need be, but can't get Dia's command line to work.
I want to use the command line with -e and -t to export the graphics to a specific directory so that pdflatex can put them in the pdf. (http://dia-installer.de/doc/en/re01.html)
The problem that I'm running into is that anytime I call it from the terminal, it brings up the GUI. Even if I give move to /Applications/Dia.app/Content/Resources/bin/ and use the command "./dia -v". It gives me a bunch of errors about "Input method" and then shows the GUI.
I looked on the Dia FAQ and it has a lot of information for the Windows command line, but nothing for OSX.
I'm hoping that someone here has run into this before and knows how to get it to work.
Thanks in advance.

run windows command from bash with output to standard out?

Folks, I'm using git tools such as git bisect run which need to call a command to build and test my project. My command to do is nant which is a windows program. Or a build.cmd script which calls nant.
It's easy to get the bash to call the nant build to run.
But the hard part is how to get the standard output written to a file?
I even installed the Windows PowerShell to try running a command from bash.
Again, it works but the standard output fill says "permission denied" when
I try to read it while the build is going on.
Update:
When running nant, the entire path is used. It is installed and runs fine. The problem is how to get the standard output when running from bash.
If running nant from the windows prompt with "> build.out" at the end of the line, you will get the standard out. But the same never works under bash. It just says build.out is locked, permissions denied.
Update:
Using tee as suggested below also doesn't solve the problem. In that case the file still report "access is denied" with any attempts to read it while the build runs. But also, the tee program never writes anything to standard output.
(If I am understanding your question correctly...)
You can probably use the 'tee' command to split the output to both a file and stdout. The line echo I am building something | tee build.out will both print the output on the console and save it to the file named "build.out".
The tee command is usually available in Cygwin, and also apparently in the Bash shell installed by msysgit (where I just tested it). Here's a good reference page for more details.
Okay, finally resolved this. It turns out the the nant build script was using git feature to erase all ignored files to cleanup. That was deleting the build.out file can causing these strange issues. Now, the process writes the build.out file to a parent directory so that it won't get deleted and now everything works smoothly as expected.

Resources