Jump to content

garion_kong

New Members
  • Posts

    3
  • Joined

  • Last visited

garion_kong's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Oh, ok. Unfortunately I am unable to get any response from the original site to clarify on the stuff in the article. I just wanted to have a dashboard tool to do the same thing, i.e. show all the volume utilization for various servers on a nice dashboard. I did try putting the whole script in .bat batch file but still not getting response from the script. I guess I will have to look around for a better solution. Thanks again for your responses.
  2. Hi requinix, ok, in that case what should be the correct syntax for linux then? I actually got the script from the following site http://www.systemtoolbox.com/article.php?articles_id=1023 with the full script as given below. The purpose of the script was to iterate through the server list file and maps each of the server drives that was indicated and takes a snapshot of the df information as it stands at that time. It then parses out the number of gigs used and appends it to a file named relative to server and drive letter. Unfortunately I can't even get past the 1st line. I thought it has to do with the list file so I just tried a simplified version with just the text strings but it seems it still didn't work. Please help. Your advise is much appreciated. Thanks! for /f "tokens=1,2 delims= " %%A in (drives.lst) do ( echo %%A %%B net use y: /del < y.ans net use y: \\%%A\%%B$ df -h | findstr -i y: > temp.txt type temp.txt | cut -f2 -d: | cut -f2 -dG > temp2.txt for /f %%Q in (temp2.txt) do ( echo %%Q >> %%A-%%B.txt ) del temp.txt del temp2.txt )
  3. Hi, I am new to linux and was trying my first experience using cygwin on Windows 7. I am trying to run the following simple script named parsescript3 in the home directory and keeps getting the error 'syntax error near unexpected token `(''. Can anyone please help and let me know what is exactly wrong with the syntax? ~/bin/parsescript3 content #!/bin/bash FOR /F "TOKENS=1,2 DELIMS=," %%A IN ("serverA,D") DO @ECHO %%A %%B Execution and output on cygwin64: ~/bin $ ./parsescript3 ./parsescript3: line 3: syntax error near unexpected token `(' ./parsescript3: line 3: `FOR /F "TOKENS=1,2 DELIMS=," %%A IN ("serverA,D") DO @ECHO %%A %%B'
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.