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.

Filter by
Sorted by
Tagged with
-1
votes
1answer
31 views

get full path to shared directory

I have done following #!/bin/bash PROJDIR="//$HOST/projects" cd $PROJDIR newscript exit 0 Purpose of the script is to enter in shared folder and trigger another script within it, but the script ...
0
votes
1answer
48 views

Why can I not change window title with mintty/wsl

I started mintty of cygwin, and run following commands : ~$ # here, we are in cygwin/bash ~$ printf "\e]0;cygwin\7" ~$ # Now I see "cygwin" on mintty's title ~$ wsl ~$ # now, we are in wsl/bash/...
0
votes
0answers
26 views

rsync exclude folder but include some files in the folder

I want to backup my Windows home directory using cygwin: rsync.exe -vrptlH --delete --exclude=AppData "/cygdrive/C/Users/user1/" "/cygdrive/D/backup/" As you can see I excluded the AppData directory....
4
votes
1answer
121 views

Why the codes generated by [UP] key changed after ssh session

I'm in a mintty window of a cygwin environment. When I typed ⎈ Ctrl+V then ↑ key I got : ^[[A Then I ssh into Raspberry Pi, and exit immediately. Now I type ⎈ Ctrl+V ...
0
votes
1answer
30 views

How to prevent ss ouput with empty lines?

Moving from netstat to iproute2 ss I noticed that the output from ss tends to spill over into empty "new lines" when connecting via SSH from a cygwin terminal. e.g.: user@host:~ $ ss -4t State ...
0
votes
0answers
55 views

Problems Installing XCRYSDEN in CYGWIN

I am trying to install XCrySDen on my computer (Windows) and I am using cygwin for this. I am following the instructions perfectly: > $ tar xvf xcrysden-1.5.53.tar.gz $ cd xcrysden-1.5.53/ $ cp ...
0
votes
1answer
77 views

How to write script in awk that tells average length of fields in each record, without counting whitespaces?

So I need to write an awk script file that finds and prints the average field length of each record in a text document. The text document is this: The quick brown fox jumped over the lazy dog's ...
0
votes
1answer
32 views

Where is the Unix script command in Cygwin?

Iirc, the Unix script command used to be in cygwin. Does anyone know what happened to it or where it is?
0
votes
0answers
64 views

chmod not working in minGW64 but working Cygwin?

I need to do some file permission changes on win10, while I can run this command under cygwin but not in git bash minGW64, can someone help to explain why? The result as from the cygwin terminal: $ ...
0
votes
0answers
8 views

cygwin xhost not working anymore

On my local Windows 10 PC I start cygwin64 and enter: #!/bin/bash set -x export DISPLAY=localhost:0.0 sleep 5 startxwin -- -listen tcp >/dev/null 2>&1 & sleep 10 then as a last step I ...
0
votes
0answers
17 views

How is it possible to call CwRsync.exe via a Bash Script with variables and arguments?

This is the commandline currently used to call Rsync that's part of Cygwin 64 install. rsync -aqHPR $CygSrcRoot/./$FolA1 $CygSrcRoot/./iMazing.Versions/Versions/$FolA1 $CygDstRoot/$DstCountFol --...
1
vote
0answers
35 views

Assigning array values while running a loop to a variable dynamically

The values present in indexArray are: 1 4 3 2 Below is the code snippet(This is not the complete code): while read -r line;do position=${indexArray[$counter]} # No value is assigned to "position" ...
2
votes
0answers
69 views

Cygwin puts space after every `fi`

Cygwin inserts a space everywhere after a combination of letters "fi". It is only visually so, if you copy the text, this space disappears. And here's the text I copied: # pidfile = /var/run/...
1
vote
1answer
45 views

Select a particular column greater than certain condition and select grep word that mentioned in the file

I have a files FB_Dataset.csv simply contains 21 columns, whereas FB_Dataset.csv is a comma delimited file. The general scheme of FB_Dataset.csv is posted below. I need to extract the word 'Trump' (...
2
votes
0answers
79 views

rsync failed: Permission denied (13) cygwin

I have mounted my destination server on my windows machine on Y: drive. I created a folder on the destination folder and when I open cygwin and run my rsync command to move data from my machine to the ...
0
votes
1answer
59 views

Working Syntax for Rsync Copy of a set of 2 or more Hard-linked Folder Trees while maintaining this specific archive structure?

Working Syntax for Rsync Copy of a set of 2 or more Hard-linked Folder Trees while maintaining this specific archive structure? PS: Would this be a better fit in SO or SU SE? Template of Current/ ...
1
vote
0answers
41 views

taskwarrior - limit calendar month output

I am working on writing a tmux script to create a fun tmux environment in cygwin. When I type 'task calendar' the output appears to look fine, but when I run the same command through my tmux script, ...
0
votes
0answers
23 views

Unable to receive trap on snmptrapd

Unable to receive traps in snmptrapd (from NET-SNMP) running on Cygwin. When I enable the debugger, it has such messages: I have the snmptrapd.conf as below: ignoreAuthFailure yes authCommunity log ...
0
votes
0answers
33 views

Tilde expansion keeps changing in xterm, $HOME seems to be OK

My cygwin terminals have been screwing up tilde(~) vs $HOME when I restart them after (yet another) Windows 10 reboot. It seems to replace characters in the home directory with some unicode crap. ...
0
votes
2answers
60 views

Specifically lower case email-addresses only

Example (random) text: StackOverflow@icloud.com:Portuguesa-Span103 StackOverflow@gmail.com-Snip1031 Stackoverflow@icloud.com:Sanchismo103 Desired output: stackoverflow@icloud.com:Portuguesa-Span103 ...
0
votes
0answers
159 views

GNU screen doesn't work in Cygwin — directory must have mode 700

I installed Cygwin on Windows 10 and screen fails with $ screen Directory '/tmp/uscreens' must have mode 777. I couldn't change the permissions for whatever reason $ chmod -R 777 /tmp $ ls -hal /...
1
vote
2answers
493 views

Sed could not edit : not a regular file

I have tried various solutions mentioned in SO to solve this problem i am facing. I want to find all files recursively and change certain text. This is the command I am using in cygwin in windows ...
0
votes
0answers
14 views

Cygwin Bash Escape Slash at First Place [duplicate]

Having this script.sh in Cygwin # !/bin/sh x="abc" echo "$x/" And running bash.exe script.sh, outputs: /bc instead of abc/ What is happening here?
0
votes
0answers
33 views

xfce on cygwin X not working!

Good evening, I have a big problem, I'm fighting desperately with my PC to launch a session but it spits and my CPU goes up to 100% When I click on exit, the software tells me that I have 13 ...
0
votes
1answer
58 views

How to remove the title bar in mintty cygwin

How do i remove the title bar in the cygwin mintty terminal window ? there is no option in the options -> window configuration
0
votes
0answers
48 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 ...
2
votes
1answer
812 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
352 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
233 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
67 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
202 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
395 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
57 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
527 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
621 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
92 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 ...
1
vote
1answer
303 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
3k 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
116 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
327 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
225 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
309 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
132 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
37 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
2k 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
133 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
418 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
114 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
26 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
80 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 ...