I am trying to convert some of my ksh93 scripts to bash in cygwin. I have found 2 things right now that give me trouble. The first is a function I put in .bashrc was not recognized in the script. I put the function in the script to get around that. The second is that it won’t glob like it
Tag: cygwin
Bash for loop with Parenthesis working in linux and not in Git Bash
i have simple bash loop which is working fine in linux and not in local Git Bash which based on cygwin in windows i have this for loop : in Git Bash it gives me this error : linux version of bash Amazon Linux version 20xx.0x is available. [user1 ~]$ bash –version GNU bash, version 4.2.46(2)-release (x86…
List and change directory and run command in Shell
I am coming back to shell after almost 6 years or so. I have a directory structure let’s say, MainDirectory –> subDirectory1/some.xml –> subDirectory2/some.xml … … –> subDirectoryN/…
writing a shell in C my program is not able to exit()
I am writing a program to implement a simple shell in C but when I execute the program at the end when I type exit it does not exit. I am executing in on cygwin hence a.exe is generated. execution of program Here you can see in the above output the program is not able to exit when I am
mistake in cin.getline() to develop a shell
I am developing a limited version of shell for my self. Here is a C++ program What I am not able to understand is when I compile this program I am getting error in line and the error is following I do a $ g++ p3.7.cpp What is the mistake above I am doing. Do I need to include some
cygwin /dev/sd* disk association to hard drive
Under cygwin on Windows 7, how would I certainly determine the hard drive that some path /dev/sd* corresponds in Windows? For example, given cygwin path /dev/sdc, which Windows letter drive does it correspond, C:, D:, etc.? The following don’t appear available within cygwin; tool lshw, tool parted, path…
C++ pThread program isn’t running to completion [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 6 years ago. Improve this question IR…
Visual Studio 2015/Linux extension produces a “collect2 : error : ld returned 1 exit status” with Cygwin
I am currently trying the Linux Extension of Visual Studio 2015. I plan to have several target machines using various distribs. So far, my testing machine is a Windows 7 with an up-to-date Cygwin with all needed packages (openssh, g++, gdb…) installed. The test I’m conducting consists in a very si…
How tar xvfz works in cygwin?
I tried tar with xvfz and -xvfc both didn’t work in Cygwin on Windows. Here cmd tar with ‘-‘ Question : 1 . How does tar works with – or without _ ? Please suggest to execute tar -xvfz sshpass-1.0.5.tar.gz. Answer tar has 3 types of syntax (according to this ): long options (–fil…
Grep across multiple lines but returning all matches
I’m trying to grep against a windows file under cygwin or linux, to find all MySQL statements between a table lock and table unlock in a mysql log. I can use awk, but I need the line numbers from the original file I don’t see why -Pzo isn’t working in cygwin Effectively I’m looking for…