|
Answer» Hello, I am looking for batch file that login to a Linux box and extract some text from a specific file and OUTPUT it to a text file then repeat the cycle for different box. Thanks,And what kind of network access do you have to these linux computers?.I have full access, I am connected to this boxes through ftp then I am getting the 2 files from each box, File.version and Build.date, each one has one line of text.
I was able to GET these files and out put the INFORMATION to a new text file which is include: IP address (From the script), version number and date(From the files).
my problem is I am not able to format the new file correctly.
I am getting the IP address in one line then the version and the date in another line all TOGETHER with no spaces.
I like to have the 3 values in one line for each device separated by tab.
Thanks,Is the FTP scripted? What format is the text in each file?
You can create an ftp script which GETS the files and extracts the information. We'd need to know more information about the task though.If you have the ftp scripted to pull the files down it is rather easy to then assign the first line of a file to a variable. Code: [Select]set /p var1=<file1.txt set /p var2=<file2.txt echo %var1% %var2%
|