One my friend wrote one script on his machine linux, when I try to use it under cygwin I recive one error about the command awk. Is there someone can suggest me the way to fix the error? The script is wrote using gawk and I have no idea what kind of comand is used by cygwin.
I have one input file like this: channels.xml
This script need give me back one file like this: channels.sh
The command to use it is like:
/cygdrive/c/ProgramData/data/picons/ is the source of the files
/cygdrive/c/ProgramData/data/picons/duplicati/ is the destination of the files
I hope is more clear
Last edited by Tapiocapioca; 02-14-2017 at 04:47 PM..
would something like this be helpful? awk -f tapi..awk channels.xml where tapi.awk is:
you can work on this code to make it more flexible integrating with the shell of your choice!
Last edited by vgersh99; 02-14-2017 at 05:33 PM..
These 2 Users Gave Thanks to vgersh99 For This Post:
One my friend wrote one script on his machine linux, when I try to use it under cygwin I recive one error about the command awk. Is there someone can suggest me the way to fix the error? The script is wrote using gawk and I have no idea what kind of comand is used by cygwin.
This is the script:
This is the command not executed correctly
Thank you in advice if someone can help me.
Quote:
Originally Posted by Tapiocapioca
Maybe I was wrong to explain, the script is working under Ubuntu but not under CYGWIN.
No. No. No. No way! The command that you say is not executed correctly on CYGWYN cannot possibly work on any Linux or CYGWIN system.
As long as there are no slash (/) characters in the file named by the 1st command-line argument given to your script, the code vgersh99 suggested should work for you (as long as the note at the end of this post does not apply). If there could be one or more slash characters in that file, try replacing that line with:
or (using one process instead of 3):
Note, however, that none of these suggestions will work if the text in the file named by the 1st command-line argument to your script contains characters that are "special" in an extended or basic regular expression if the intent is to match them as literal characters.
But, of course, now that I see post #3, it is obvious that absolutely no chance that this script is going to produce any output at all similar to the output you say you want. With the sample input you have shown us, the output from the 1st awk command in your script will produce the output:
in the file named temp and the 1st grep in the 2nd awk pipeline will discard that output. There is nothing in your code that makes any attempt to create cp commands as output.
It is also interesting to note that your script requires four command-line arguments, but only the 1st two are used???
This User Gave Thanks to Don Cragun For This Post:
Development machine:- Standard MBP 13 inch, OSX 10.7.5...
GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)
Copyright (C) 2007 Free Software Foundation, Inc.
Scenario:- Audio capture for AudioScope.sh for CygWin without ANY third party installs.
I am trying my hardest to get a... (6 Replies)
Running bash in cygwin under 2003 Server. I run about 6 shell windows. Every now and then when I check the machine, all of the scripts are scrolling and returning /usr/bin/whatever: command not found.
I checked the event log for a windows event that would cause it, but there was nothing. I... (9 Replies)
Hello,
In my make file (make 3.81), I use a combination of shell commands to automatically create the name of my build directory.
OS := $(shell uname -s)
ARCH := $(shell uname -m)
KERN := $(shell uname -r | cut -d. -f 1,2)
BDIR := $(OS)_$(KERN).$(ARCH)When I boot into different OSs, I... (7 Replies)
Hi,
I have installed CYGWIN software in my system, can anyone suggest me how to run cat command in this software ?
when i attempt to execute this command-
$ cat /cygdrive/c/Program\Files/hello.txt.
Result: No such file or directory.
Please let me know how to execute.
Regards,
Kiran. (1 Reply)
Hello everyone,
I am struggling a bit with a batch script that I need to run in cygwin. I work in winXP and I had to write some awk scripts to do some file manipulation, and now I would like to automate the process by just running a batch file so that my colleagues can use it easily.
Now, the... (2 Replies)
How do I change my command line to the standard appearance? (i.e.: The pwd is listed in green above the actual command line).
Mine looks like http://sites.google.com/site/flcl178/Cygwin_Window_1.png
and I want it to look like this http://sites.google.com/site/flcl178/cygwinLinkSetup.gif
... (2 Replies)
what does the '+' sign stand for on the output of ls command on cygwin?
-rw-------+ 1 milhan None 146783 Jun 19 12:10 schedule.pdf
-rw-------+ 1 milhan None 320 Aug 15 17:14 current.txt
-rw------- 1 milhan None 24576 Dec 28 2008 fdfd.txt (2 Replies)
Sir,
I want to get all the files in directory on a remote server which are dated newer than a specified file. I have ssh running and the command I am using is :
for file_name in `ssh userid@IP find "/cygdrive/d/oracle/oradata/db/archive" -newer "1_44.DBF" -name '*.DBF' -type f -print | xargs -r... (2 Replies)
If I'm at a wireless cafe running SuSE and I want to read my mail but the wireless cafe blocks port 25 for smtp but I have a VPN connection to my home machine, how do I use the "route" command.
If I'm at home on my windows machine and have a VPN connection to another network, can I use the... (3 Replies)
I am new to unix and lerning tru cygwin (unix simulation on windows)
i am trying to lern sed command and want to interchange first and second no in a string. What i mean is
i want gauri 1234 556 to gauri 556 1234
i am getting the following error
$ echo gauri 1234 556 | sed s/\(*\)... (2 Replies)