I am totally new about the universe of scripting and I am using linux command under windows.
I need join two xml files in only one, the files have a specific structure
I tried to do it with sed, but I can't. Can someone help me? Please don't suggest me scripting really advanced becuase I can only lunch command by command.
Are the files you want to merge on Windows or are they on a Linux system that you are accessing while you are logged into a Windows system?
Are you running Linux-like commands on your Windows system provided as part of something like Cygwin or are you logging into a Linux system using something like rsh and running commands directly on a Linux system?
No I am not using Cygwin, I am using the project GnuWin Packages, is quite old but works in great way. I write the linux commands directly on the dos shell, but all commands are working really well. Before have the srtructure I posted I cleaned many parts of the files deleting blank lines and tags I don't need with sed. But about join I am not able
No I can't execute files .sh, I can only write the command one by one, I can only make one file .bat and process the commands like one list.
Just for example when I need delete che line start with the tag <url> I lunch the command
sed -i "/<url/d" C:\epg-guide.xml
after I need copy the file and I use the dos command copy I know is really better if i can use directly linux, but the machine I am using is in Italy and I am in Indonesia, I can't reinstall the system
The name of the files is like epg-guide_01.xml and epg-guide_02.xml and I need make one new file epg-guide_03.xml
Excuseme if I am not really clear about my request
You are really tying our hands behind our backs here. You say you can execute Linux commands, but only if they are one-liners that don't use any shell language features like variable expansions and here-documents.
You say you have GNU tools. That must include sh (maybe sh.exe ) and you must be able to execute that in a .bat file to execute a shell script with something like the following. Please create a .bat file containing:
I tried to find what you told me, but I can't find it. Here there is the list of the possible command hxxp://gnuwin32.sourceforge.net/packages.html I think what you told me is no available
---------- Post updated at 04:20 PM ---------- Previous update was at 04:18 PM ----------
I have not but i think is avalaible, I try to find and install it.
I found and downloaded this hxxp://www.activestate.com/activeperl/downloads , but I am totally beginner about, what the way to use your script? Where can I input my files? Excuseme if I am asking really simple questions for you totally clear.
Tell us a bit more about that Italy - Indonesia setup. Are both machines Windows? How do you connect/login? Is there an option to copy those files elsewhere?
I use remote desktop to connect to one machine with windows 7, is a real machine not virtual. I connect mysel from indonenesia to italy, but I think this is not really important I tried to make some scripts with dos but the xml files I need edit are big like 100 mb and windows become crazy trying to modify big files, so I tried the solution of GnuWin32 Packages and works fine. But about join files with linux command I have not idea