0
votes
1answer
78 views

trying to extract two tables at a time from http files with 40 tables each

I have about 20 webpages. Each page has top banner navigation and then has information on up to 20 vehicles. There are 2 tables per vehicle. The logical flow is: page navigation, table 1 for ...
1
vote
1answer
131 views

Grep to find files that contain ^M When ^m dos2unix and sed or “grep -r $'\r' *” does not work

I use Cygwin and made a txt file using a Perl script. There is a ^M (Windows cariage return) added, and I have no idea how. How do I find ^M when normal ways (^m dos2unix and sed or "grep -r $'\r' ...
1
vote
3answers
367 views

sed quotes and backslashes on cygwin

I am trying to extract a substring from a string with sed on cygwin. #!/bin/bash var1="foo\ bar" var2="baz" var3="$var1 $var2" # extract "foo\ bar" from "foo\ bar baz" var4=`echo $var3 | sed ...
1
vote
1answer
207 views

error occur when i run awk command write in .sh file and run in cygwin terminal

i have cygwin terminal for run shell script(.sh ) file...it work good..but when i add awk command in shell script and then run Error occur /usr/bin/gawk.exe: error while loading shared libraries: ...
2
votes
3answers
324 views

matching start of the line in cygwin regexp

I apply sed 's/^ bug*/__/' to ref bug bug ref and get ref __ __ ref The same is responded for perl, perl -ni -e 's/^ bug/__/; print'. Sample file can be downloaded ...
0
votes
1answer
97 views

Replace Certain Elements in a Path with a Tag

I want to modify paths with a certain pattern. For example ./foo/1023023/43655345/bar/ becomes ./foo/_dir_/_dir_/bar/ The pattern is always preceded by /foo/ followed by 2 directories that have ...
0
votes
3answers
432 views

Parse and remove parts of strings between delimiters

I would like to go through a file and remove certain sequences in between delimiters. For example drw---- 00000000 11111111 0 ./a/ drw---- 00000000 11111111 0 ./b/ d------ 00000000 ...
0
votes
1answer
212 views

Why does sed cause git to consider the entire file rewritten?

Using Cygwin on Win7x32, when I use sed to replace some values in a file, git then considers the entire file to be completely rewritten (i.e., 500 insertions, 500 deletions). What's going on here? ...
8
votes
3answers
1k views

Cygwin bash sed locks my files

When I change files in cygwin bash with the sed command, the file gets locked. Reproduce: Open cmd and cd to non-user directory (f.e. temp) echo aaa > test.txt Open in texteditor, add line, try ...