Skip to content
Advertisement

Tag: batch-file

How to get unix style prompt in windows (batch)

I am trying to make dos shell which displayes a unix/linux promt. The code is: I want it to display directory name like in unix/linux but it displays a ~. What is wrong in my code? Can you please help me improve it? Answer Probably not quite on the ball with the prompts specific situational substring modification, but the Method

Converting from batch to shell

I have a set of batch commands that I’m trying to convert to shell so I can use them on my linux environment. The command should read In windows (using batch), running this command should produce a set of files that are numbered like this: 0001_inside.hdr 0002_inside.hdr etc. However, when I ran this command in bash, I expected to get

Command Not Found CentOS | .bat File

Im trying to run a .bat file on my server through php popen command, ive struggled and finally got to the point where all the permissions are set correctly and now i can actually execute the file but i have a problem. In my server logs it displays foo.bat: line 1: mstsc: command not found, referer: http://dev.example.com The full code

Shell script file with multiple commands

I want to make shell script file in windows and linux with multiple commands inside it. E.g run.sh and run.bat with the below commands run.bat or run.sh When I run my run.bat file it only executes first command mvn clean but it do not execute other commands. How to make shell-script file with multiple commands so that when I execute

bash script version of forfiles

I’m currently converting a DOS batch script to a shell script and while I have 99% of it working, one part I cannot figure out how to convert over. In the batch file, I have a line that looks like How would I write that for a shell script? Answer Try this, this will delete files without prompting To be

How do I write this in a batch file

I am trying to convert a shell script into a batch file but I am stuck at this place. I am not quite sure how to convert this line into my batch file. I tried but I am not sure if I am right! Answer You can’t do command chaining like this in Batch. If I see that correctly, you

SSH to multiple machines using a batch file

I have a large number of Linux devices that i want to be able to SSH into and change the netmask. I wanted to create a batch file to do this so that i can export a list of the IP addresses and then run a batch to change the netmask. I expected my script to be something along the

Advertisement