Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cygwin]

Linux-like environment for Windows making it possible to port software running on POSIX systems (such as Gnu/Linux, BSD, and UNIX systems) to Windows.

0
votes
0answers
19 views

How to switch user in the server by su without password through shell script?

I am using cygwin to run my expect command for login into server. Once login i have to switch the user by su command writing password in the shell script which does not prompt for password and ...
1
vote
1answer
44 views

Using sed within a makefile

I want to modify the cygwin path to the windows path from within a makefile. For that purpose, I am using CURDIR := `pwd` WINDIR := $(shell echo $(CURDIR) | sed -e "s/\/cygdrive\/\(.\)/\1:/" | sed -e ...
2
votes
1answer
222 views

Is “/bin/[.exe” a legitimate file? [Cygwin, Windows 10] [duplicate]

I can not find anything about this, is it a known file? I am using a CYGWIN based terminal on windows 10 Here are their locations and the commands I used. $ find -name [* ./bin/[.exe ./usr/bin/[.exe ...
0
votes
2answers
75 views

Echo Results of a Variable in Sed Replacement

I have a file called LoginExcInternal.txt which has data that looks like the following: Name1 OpenFin/111.111.111.111 Name2 OpenFin/111.111.111.112 Name3 Chrome/111.111.111.111 These two ...
0
votes
0answers
58 views

How do I stop my terminal from clearing the command when I hit enter

I am using mintty under Cygwin on Windows 10. I don't know why this started happening but suddenly everytime I type a command and hit enter, the command and all the scrollback text is cleared. I don'...
0
votes
2answers
67 views

Add line breaks to Grep Commands

How can I add a few line breaks? I want it to show OpenFin category, have a line break, Chrome category, another line break, then memoryInfo. Here is what I have so far: cat LoginExInternal.txt | ...
1
vote
1answer
55 views

/bin/crontab and /usr/sbin/cron in cygwin - what is the difference?

I have just installed Cygwin on my Win Server 2008. I have a bash backup script (to backup some user files to an external harddrive) that I want to run on the machine, under crontab, every night. I ...
0
votes
1answer
50 views

Grepping email file against email file

I have 1 file of emaiils (4.6m lines) I have another file of emails (100m lines). I want to see how many of these 4.6m lines occur in the file which has 100m lines. I've researched already, and ...
7
votes
1answer
446 views

Shells with the ability to treat `\r` as a whitespace character

As a personal project, I'm trying to write a script to clean up some of the extraneous files that ship with Windows 10 that runs under Cygwin. I'd like the script to be copy and paste-able, which ...
2
votes
1answer
324 views

Rsync - write permission denied

I use rsync on Windows (Cygwin), where I move files from shared folder (from another Windows instance) to NFS storage. I have mapped the shared folder to one drive and mounted the NFS folder to ...
-1
votes
2answers
48 views

How to select a line in Cygwin

I am unable to select a line in cygwin, atleast by using the traditional windows method of clicking and dragging the mouse curser across the line that i would like to select. Is there a specific ...
0
votes
1answer
130 views

Tmux binding error `returned 127` in cygwin

I want to use a clipboard manager in tmux. It is the CopyQ, but it does not matter, I guess. In ~/.tmux.conf I set following binding: set-window-option -g mode-keys vi bind C-y run 'out=`tmux save-...
0
votes
2answers
1k views

Where is Cygwin set its PATH variable?

If I write echo $PATH in my Cygwin window (mintty) I get a list of paths. That list does not match the Windows Envirnonement variables list. I cannot find a file, where is the variable $PATH set. None ...
1
vote
0answers
55 views

wget behaves differently on cygwin and centos

On cygwin this command works as expected and exits immediately: wget --post-file oryxblock.2018-10-10_20_40-07_591.204.txt --output-document - --header "Content-Type: text/csv" http://htm-psycho-402....
0
votes
2answers
157 views

setfacl -R doesn't work on Cygwin

I want to change the ACL and the default ACL for all directories and files in a base directory. In other answers (such as this one), the -R flag is used. However, I get $ setfacl -R -m u::rwx my_dir/ ...
1
vote
0answers
147 views

ls ~ permission denied with xonsh in Cygwin

I tried to use xonsh in my Cygwin terminal, but ran into some problems with permissions: loom@tatooine ~ $ ls xonsh: subprocess mode: permission denied: ls However, I can use the command ls as ...
5
votes
1answer
246 views

Can't chown 0 (root) in Cygwin

This command: rm -f testfile && touch testfile && chown 0 testfile is failing in Cygwin with error: chown: changing ownership of 'testfile': Invalid argument Why?
0
votes
1answer
65 views

gawk process multiple files inside directory

I have multiple text files in a folder that I want to process through gawk, rather than process them each individually is it possible I can process them all at once without merging them into 1 .txt ...
0
votes
1answer
32 views

(BASH) String to execute is formed correctly, but evaluated with errors

I have been persistently trying to solve an issue with some code that I'd like to use to interact with AWS CLI. After trying for about a week, I decided to try to create the string of the command I'd ...
-1
votes
1answer
704 views

Copy file from Windows to Linux WHEN A SHELL SCRIPT IS EXECUTED

I have a program on Linux server, which runs a shell script on Linux server. Say "/tmp/ShellScript.sh" Now I want to copy a file placed on my Windows Machine location "C:\WindowsFolder\FileToCopy" to ...
1
vote
1answer
86 views

Gawk partial match

My gawk script isn't matching all potential results, it's only matching one of them.. Example - script: gawk -F: "FNR==NR{a[$2]=$1;next} $1 in a{print a[$1] FS $2}" username.email.txt email.phone....
0
votes
1answer
192 views

How to ssh into CentOS instance on Openstack with pregenerated PEM private key using Cygwin

I am missing something simple here. Can someone help determine why I can't ssh into this remote CentOS instance on Openstack using the pre-generated private key. I created a public/private key in ...
1
vote
1answer
66 views

Emacs silently fails to start under Cygwin

I installed emacs 26 under cygwin64, terminal version, no X. When I enter emacs to start there is a second or so delay before the bash prompt reurns, the error code is set to 0. The same thing ...
0
votes
1answer
22 views

Slice between two strings (email + word) [closed]

I need a way to slice everything after an email appears and before certain text appears. Example formats are shown here: email@email.com:0:3rw3e:weofkew:StackOverflow= email@email.com:19.2132.1:...
0
votes
2answers
61 views

Bash Split into files by line

I have a huge .txt file with multiple lines, but there's a particular string on a line that separates a number of lines from one another I want to use that string to split into numerous files named ...
1
vote
1answer
988 views

cygwin putty Startup Error: Unable to detect graphics environment

When I start cygwin/X X Server (1.17.1-2) and then putty with x11 forwarding enabled (X display location set to localhost:10.0 and MIT-Magic-Cookie-1 ticked) I still get the error Startup Error: ...
0
votes
1answer
68 views

Sort .csv file alphabetically doesn't work correctly when there is a hyphen [duplicate]

I want to sort a .csv file which contains different names. But there is a problem when a name has a hyphen at the beginning. I tried things like: sort -k1 -t sort -k1 -g -t sort -k1 -n -t input: ...
7
votes
3answers
535 views

Why am I required to use an IP address when Waking-on-LAN a computer?

I have a new GNU/Linux Debian 9 server installation. This is what I get from ethtool: root@web-server:~# ethtool enp2s0 Settings for enp2s0: Supported ports: [ TP MII ] Supported ...
2
votes
1answer
321 views

How to find files with a specific pattern in the parent and child directory?

How to find files with a specific pattern in the parent and child directory of my present working directory using a single command ? Filename - test.txt, the file has the pattern nslookup This file ...
1
vote
4answers
771 views

Treat “\r” as nothing in “while read -r”

I have this line of code that reads a text file line by line. The text file is sometimes generated by a Windows user, sometimes by a Unix user. Therefore, sometimes I see \r\n at the end of the line ...
1
vote
3answers
100 views

Printing columns using AWK?

I have roughly 7 columns on each line, I want to print two specific columns then the remaining columns after the last specified one, example: awk -F: {' print $2 ":" $6 '} a.txt would print columns ...
4
votes
1answer
829 views

ping command always returns zero exit code in cygwin

I just noticed the ping command always returns zero exit code in cygwin. I installed it as a package ping. Actual output: $ ping 192.168.0.102 -c 1 PING 192.168.0.102 (192.168.0.102): 0 data bytes ...
0
votes
0answers
746 views

Freeglut () failed to open display

I'm coding, running a software called Madagascar within Cygwin. I have made a SConscript file and then run the command scons, which works. But when I run the command scons view, which is supposed to ...
0
votes
1answer
68 views

bspwm on cygwin - slow redraw isssue

I have managed to compile bspwm tiling window manager under cygwin 2.10.0(0.325/5/3) (Windows 7), compared to Openbox, LXDE or fwvm the performance is quite bad. Can you please suggest me some ideas ...
0
votes
2answers
318 views

How to make my Makefile compatible with Cygwin? (install: invalid user ‘root’)

I have written a very simple Makefile $ cat Makefile install_path=/usr/local/bin script_name_1=encrypt-file-aes256 script_name_2=decrypt-file-aes256 .PHONY: install .PHONY: uninstall install: ...
1
vote
1answer
1k views

Which cygwin package contains ip command?

I need the ip command in cygwin. I discovered that it's part of the iproutes2 package. But cygwin doesn't have that package?? I what cygwin package can I find ip command? (I need to find the gateway,...
0
votes
0answers
23 views

Is it possible to link the device and other things (like null, random and urandom) in the subdirectory /dev in MSYS2?

Q1: Is there any program or command which initialize all the accessible device to %MSYS_Root%\dev? Q2: If the answer to Q1 is positive, can I access them in bash.exe without Administrator prior? Q3: ...
0
votes
1answer
169 views

LFTP adds “;type=i” to remote file name

I'm using LFTP version 4.7.8 under cygwin. It automatically adds ";type=i" (or ";type=a" if I do put -a) to remote file name. What's more, mv command does not work : mv: Operation not supported: 501 ...
1
vote
1answer
315 views

compiling i3 under cygwin - cannot find libiconv library

I am trying to compile i3 version 4.14.1 under Cygwin 2.884 (Windows 7). I have installed needed libiconv library via Cygwin setup but while running ./configure I get this error: configure: error: in ...
0
votes
0answers
36 views

Enabling vim undo history in Cygwin

I have an install of Cygwin on a Windows 10 machine. I am trying to enable undo history in vim so that it is remembered between vim instances. At the moment everything is forgotten after closing the ...
2
votes
1answer
93 views

Why `env` does not find my executable?

I'm trying to use shebang with /usr/bin/env form to execute my script under custom interpret. This is how my file looks: $ cat test.rb #!/usr/bin/env winruby print "Input someting: " puts "Got: #{...
0
votes
1answer
106 views

Exact String match works for grep 2.6.3 but not for grep 3.0

I am facing an issue on my windows machine with Cygwin in it. On one of my machine grep exact string match using $ works: $ ipconfig /all | grep -A 1 'My Ethernet Server Adapter B52-2$' ...
0
votes
1answer
551 views

Replacing getopts.pl with Getopt::Std [closed]

I am using Cygwin version 2.10.0 with perl 5.26.0. I need to change getopts.pl to Getopt::Std but what to do with &Getopts('F:f:'); line then? #! /usr/bin/perl require "getopts.pl" ; # Perl ...
0
votes
4answers
287 views

sed remove digits from end of stirng

remove digits from end of string, example input: example123 example321 example0123 expected output: example example example I tried the below which didn't work: sed 's/[0-9]\+$//' <in.txt >...
-2
votes
1answer
57 views

viewing actual file size of folder

I know that the command du -csbh will show you the actual file size of a directory. This will be displayed as: 241 MB which is fine. If I look in windows 10 at the properties of the same folder. The ...
0
votes
2answers
260 views

How do I avoid make to generate and install man pages?

Context: I'm compiling OpenLDAP on Windows inside CygWin. As I'm not interested in man pages (and possibly other documentation, I'm focused on getting the compilation done), since I can get them ...
1
vote
1answer
73 views

Escaping single quote [closed]

I had to wipe my drive and reinstall windows, which also required reinstalling cygwin. In my new install, ls -l "*\'*" returns ls: cannot access '*\'\''*': No such file or directory For years up ...
0
votes
2answers
101 views

Can't install to Cygwin's MinGW sysroot (it's protected)

I have built a library with this command: $ ../configure '--host=x86_64-w64-mingw32' --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw && make && make install Installation fails ...
0
votes
1answer
375 views

Cygwin: installing Seismic Unix - error during make install

I am trying to install the software "Seismic Unix" for Cygwin on Windows. Under normal circumstances the issue described below would probably be fixed with downloading Cygwin again and doing just a ...
0
votes
2answers
146 views

Have bash script running every min in Cygwin

I have the following script and I need this to run every minute on my windows server. The file path is d/TFTP/script.sh so I was wondering if I can insert a while loop or some other method so I can ...