Writing NetShow comparable script
I am trying to write perl cgi base script has the same concept like net show and the main reason for that is the out put of the show command to writen to screen instead of file like net show. I don't want to give LMS file access to everyone.so I want everyone else to use this script when they want to to run Cisco IOS commands on multiple devices.
here is my initial script but I am stack on the middle, hopefully there is some one perl expert on this forum! and I am really apperciate if some one able indicating my error on attached script! thanks much!!
thanks much Joe, i have used your suggestion and I am able to pull information from the device from bowser input. (attached the updated script) the only issue I have now, some reason the script not pulling information from multiple devices only access one devices at the time. even though i have selected (router -1, 2, 3 and 4) from the list only showing the result of one devices. do you see any thing?? thanks again for your help
Similar Messages
-
Invoking Beyond Compare script using TFS build script
Hi,
As a part of automated build process in TFS I used invoke-process activity to run Beyond Compare script to generate report for comparing different versions of same xls file. Report was never created. I had gone through the tfs build log and it does not show
any error but with result = 0 ( as far as the beyond script is concerned "result=0" is successful). I compared same file of different versions manually on the same build server using beyond compare, it works like a gem resulting xml report. Same
TFS build process for other format files like .csv and .txt works smoothly generating xml report. The only issue is with .xls files.
If not Beyond Compare is the right one to call its script from TFS build process, is there any other tool or software that fits to my requirement? I need your guidance and help to take it forward.
FYI, We are using TFS 2010 and Beyond Comapare pro 3.3.3
Thanks
AdithyaHi Adithya,
Thanks for your post.
In your build definition, change the Logging Verbosity =
Diagnostic, then queue your build definition, after build run completed, you can find the build in
Build Explorer, then open build in VS, under View Log section to check which command line be executed in your invoke-process activity section. Then logon your build agent machine, and try to execute the same command line, ensure
the command line can be executed correctly and you will receive the expected result.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Help writing first Java Script
HELP!! I am writing my first Java Script for a class but cannot figure out what I am doing wrong. I have created a from and need to write a script to verify that all form entries are filled before allowing the data to submit. Can some one please look at my code below and tell me what I am doing wrong!! Thank you
<HTML>
<HEAD>
<TITLE>Project 8 IT 117 Section 01 6/13/2003</TITLE>
</HEAD>
<BODY BGCOLOR="#007FFF">
<FONT FACE="Arial">
<STRONG><UL>
<LI>Search our stock
</UL>
<UL>
<LI>Place an order
</UL>
<UL>
<LI>Out-of-print searches
</UL>
<UL>
<LI>Events calendar
</UL></STRONG>
<SCRIPT LANGUAGE="JavaScript">
<!--
function submit() {
alert("Information submitted!")
function verify() {
if document.info.elements[0].value=="" ||
document.info.elements[1].value=="" ||
document.info.elements[2].value=="" ||
document.info.elements[3].value=="" ||
document.info.elements[4].value=="" ||
document.info.elements[5].value=="" ||
document.info.elements[6].value=="" {
alert("Please complete each field")
} else {
submit()
//-->
</SCRIPT>
<H2>Sign up for our mailing list.</H2>
<FORM NAME="info">
<STRONG>First Name:<INPUT TYPE="TEXT" SIZE="20" NAME="FIRSTNAME">
Last Name:<INPUT TYPE="TEXT" SIZE="20" NAME="LASTNAME"><BR>
Street Address:<INPUT TYPE="TEXT" SIZE="50" NAME="ADDRESS"><BR>
City:<INPUT TYPE="TEXT" SIZE="20" NAME="CITY">
State:<INPUT TYPE="TEXT" SIZE="6" NAME="STATE">
Zip Code:<INPUT TYPE="TEXT" SIZE="15" NAME="ZIPCODE"><BR>
E-Mail:<INPUT TYPE="TEXT" SIZE="50" NAME="E-MAIL">
<BR>Click here to submit this information. <INPUT TYPE="BUTTON" VALUE="Send now!" onClick="SUBMITTED()"></STRONG>
</FORM>
</FONT>
</BODY>
</HTML>Just a thought, but shouldn't you be calling "verify()" instead of "SUBMITTED()" in your onClick handler? And warnerja is right, javascript is not really java.
-
Need Help Writing a Shell Script
Basically I'm writing a script that opens TextEdit so I can open it from the Terminal. I also want it to run in the background so I can continue using the Terminal without having to quit TextEdit first. So far I've figured out two ways of doing this, and neither one does exactly what I want it to do. Here's the first one I tried:
/Applications/TextEdit.app/Contents/MacOS/TextEdit $@ &
The problem with this is that if TextEdit is already running, it opens a new instance of it to open the files, and it doesn't bring the app into focus when I run it. So I decided to try this:
open -a "TextEdit" $@ &
This way all files open in the same instance of TextEdit and it brings the app to the front, but it won't let me save anything I don't have write privileges for, even if I run it with sudo. I Googled it and apparently what happens is it runs "open" as root but runs the actual application that I'm opening as the current user.
So basically what I need to know is if there's a way of doing this that will congregate all files into the same instance of TextEdit and bring the app to the front when I launch it, but still let me run it as root with sudo. If not, is there at least a way to check if TextEdit is running and throw an error if it is?#!/usr/bin/env bash
if ps ax | grep '[T]extEdit'; then
echo "TextEdit is already running!"
else
/Applications/TextEdit.app/Contents/MacOS/TextEdit &
fi
open -a TextEdit "$@"
osascript -e 'tell application "TextEdit" to activate'
Example:
your.script "text file.txt"
NOTE 1: When posting code to this forum, enclose your code in
...your code goes here...
This will make sure that all your indentation and other meta-characters that might get interpreted by the forum code will be left alone.
NOTE 2: The $@ will ONLY preserve quoted strings as a single argument if it is specified as "$@". That is to say it MUST be inside a pair fo double-quotes. Otherwise it is the same as $* The missing ".." are what messed up your ability to treat a file with space as a single argument. ALSO NOTE, I specified the file on the command line inside quotes (could be single or double), or you could use if you desire.
NOTE 2 and a half:
If you DO NOT want to put quotes around the space filled filename when invoking your script, you could change your "$@" to "$*"
open -a TextEdit "$*"
The difference is that using "$@" will allow specifying several filenames on the command line and TextEdit will open all of them at once. The use of "$*" means you can only open 1 file per use of your script. Not a big deal, but I figured you should know the options available to you.
NOTE 3: I've simplified your script.
I do not know why you decided that if you are root you wanted to use sudo, since sudo gives normal users root privileges, and root already has root privileges.
Actually based on earlier exchanges, I would have thought that you wanted to start TextEdit using sudo, unless it was already running:
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit &
so that you had root privileges allowing you to write files in places you were normally not allowed. Then again, maybe I was reading the earlier posting wrong (won't be the first time ).
NOTE 4: The use of
if [ "$textedit" > /dev/null ]; then
is just plain wierd This translates to the command:
test "$textedit" >/dev/null
which redirects standard output into /dev/null, so the actually command looks like
test "$textedit"
which will essentially return TRUE if $textedit has a string in it, and FALSE if $textedit is empty.
I decided to just use the completion status of the grep command as a way to decide if TextEdit was running on not.
NOTE 5: I simplified the ps|grep|grep command with a trick I learned several years ago. The '[T]extEdit' regular expression exactly matchs TextEdit, except that it DOES NOT match a ps line that has '[T]extEdit'. So I can get rid of one grep command because it will never match the grep command in the ps output.
NOTE 6: I moved the open and osascript commands outside the if structure, as I assumed you wanted osascript to bring TextEdit to the foreground regardless of whether it was already running or not, and the open command was identical for both halfs of the if structure. If this is a bad assumption, feel free do put it back inside the if structure.
Message was edited by: BobHarris -
Help me for writing the password script on solaris
hi,
help me for writing password scripts to change the user/root password.
in the script itself myself want to mention the new password.
now user want to login with the new password only.
model script:
echo $test:`perl -e '$x=crypt('$test123','test');
print $x'`::::::: >> /etc/shadow
test--->username
test123---->new password.
the above script is not working.
kindly help me for writing the script.
Regards,
rajaWell. For one thing, if you just append the new password to the /etc/shadow file there will be two entries for the user in that file (at least if the user already had a password). Which probably is a bad thing.
-
Writing Server Repost Script to post data to Eloqua
Hello!
Newbie here.
Been trying to follow tutorials on form repost and found one article:
Eloqua Artisan: Using Form Reposts for Advanced Form Integration
Currently I'm stuck on step#5.
Can anyone enlighten me on writing a server repost script to post data to Eloqua.
A sample script will be very much appreciated.
Thanks in advanced!Hey Theresa,
I can help you out with that. Can you tell me what languages are supported on the server you're trying to re-post from (e.g. PHP, Ruby, ASP, etc.)?
Thanks,
Ilya Hoffman
Synapse Automation -
Writing Message Filters Script via CLI
Is there any document to refer while writing scripts for message filters?
My ESA is on version 8.0.1 and I am unable to make text "case insensitive" while checking that text under "contains" rule? Is there any mechanism to look for text by ignoring the case?using (?i) in either message or content filter will allow case insensitivity to be used.
Ex.
subject == "(?i)\\[SEND SECURE\\]”
* Q: What does (?i) do? Case insensitivity. Allows for “[SEND SECURE]”, “[send secure]”, “[SeNd SeCuRe]”, etc.
http://www.cisco.com/c/en/us/support/docs/security/email-security-appliance/118013-config-cdc-00.html
See either the Email Security End User Guide, or the older Advanced Configuration Guide - and look for the "Using Message Filters to Enforce Email Policies" section for full information and examples!
http://www.cisco.com/c/en/us/support/security/email-security-appliance/products-user-guide-list.html
I hope this helps!
-Robert
(*If you have received the answer to your original question, and found this helpful/correct - please mark the question as answered, and be sure to leave a rating to reflect!) -
Some questions about writing rc.d scripts the right way
Hello everyone,
I'm setting up an environment and have a number of server daemons that I would like to automate the startup of, so I'd like to write some rc.d scripts for them. Now, I could just go ahead and roll my own but I thought I should try to learn the correct way of doing this.
I have already read the wiki page (https://wiki.archlinux.org/index.php/Wr … .d_scripts) and have used the example there as a starting point, I have a working script that starts a daemon. However I have some questions...
How do I handle the case where the daemon's name differs from the running process? Once case I have is to start up a web server for ruby documentation. The process I need to start is "gem server" but what is listed in ps is "ruby ... gem server". Starting works just fine, but when trying to stop it the rc.d script uses "pidof gem" to locate the daemon which fails because there is no such process (it's ruby) so stopping the daemon fails.
My second query is how to handle multiple daemons that differ only in their arguments. I don't think the rc.d script can handle this. I would like to run several of these "gem servers" for different trees of development.
I may be better off in this case just writing my own thing to do it.
Any help and advice appreciated...Yeah, look elsewhere.
find / -name \*.pid
Edit: an example:
PIDFILE=/var/run/named/named.pid
It's in a subdirectory, so that the user that BIND runs at, has permission to create and remove the pidfile from that directory.
One thing to bear in mind, when stopping a daemon, is that it might not stop immediately. E.g. lighttpd, when asked to do an orderly shutdown with:
kill -TERM $(pidof -s /usr/sbin/lighttpd) 2>/dev/null
Cannot be immediately checked in the initscript. My erm, workaround for that is to just assume that it got the message
Last edited by brebs (2012-03-07 13:49:17) -
Hi Folks,
How to compare the script version lying in development with Production version.
I had checked the requests in SE03.There are a few requests which are moved only upto quality.Now I wanna compare the version lying in development with production version.Kindly let me know how.
Thanks,
Kiran.Hi,
go to se71--> enter script name -->next go to menu bar >Utitlites>compare forms
-->Form 1 is Dev client -->form2 is PRd clinet number and execute it will show the differences.
OR
go to se71--> enter script name -->next go to menu bar >Utitlites>compare clinets
-->give PRd clinet number and execute it will show the differences.
regards,
Prabhudas -
Need help in writing a vbs script
I am very new to scripting and need help in scripting the following:
When the Windows 7 machine boots up or a user logs on (easy to do with GPO), I want to execute a script that starts some services
ONLY if the length of the computer name is less than or equal to 15 else it should exit. It has to be done in the background without any user interaction.
The script should be able to work for both x86 and x64 version of Win7.
Any help would be greatly appreciated.
Thanks in advance.
JD
JDHi,
I highly recommend that you skip VBScript and learn PowerShell instead. This is pretty trivial in PowerShell:
If ($env:COMPUTERNAME.Length -le 15) {
# Do stuff
# HINT: Look into Start-Service
Write-Host "Under limit: $env:COMPUTERNAME"
} Else {
# Do optional stuff
Write-Host "Over limit: $env:COMPUTERNAME"
(OT: jrv - happy? =])
If you must stick with VBScript for some odd reason, here's an example to get you started:
Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputerName = wshNetwork.ComputerName
If Len(strComputerName) <= 15 Then
'Do stuff here when the name is short enough
WScript.Echo "Under limit: " & strComputerName
Else
'Do stuff here when the name is too long (only if you want to)
WScript.Echo "Over limit: " & strComputerName
End If
http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/services/
Don't retire TechNet! -
(Don't give up yet - 12,830+ strong and growing) -
When comparing scripts and smartforms which is better
hi can you please help out the advantages and disadvantages of scripts and smartforms
Welcome to SCN.
Please read forum rules (you'll see that you must search the forum first (your question is already answered)) -
It is possible to writing vertically in script/smart forms
I am trying to write vertically in script,
how to write in script
then how to draw vertical line in script?
I try to draw vertical line / box
my code is,
&vline(10)&
bt it appered
I I I I I I I I I I
Thanks,
VinoHi Vino,
The only way I can see to place text like this is to write it as invidual characters on each line like you have done above. Perpahs you canj use tab stops to place the characters on each line for alignment.
There are commands to rotate text but this will not give the result you require.
Regards,
Aidan -
Writing Cleint side scripting to edit internal table
Hello Gurus
I have a internal table which i am displaying in tableview . i want to add record into the itab when i i click on one button on the form.
I want to do it this action in the client side using abap script of java script.
I am not sure how to handle internal table with java script. and one more question is that how to write client side abap script.?
Is there any recommendation?
Thanks
HariI guess you didn't quiet understand my question.
1. Can i access page attribute s( ex:iinternal table ,or string variable ) in the client script.( java script which runs on client browser ).
2. If the above answer is yes, how to add a record into intertal table with java code . ( syntax ) .
Thanks for the help.
Thanks
Hari -
Database compare script to sync schema and data
1. I have database-1
2. I have database-2
3. database-1 and database-2 are in same oracle 10g server and are same in schema as well as data
4. All operations will be done with database-1 through my application
5. At the end of the day i need a script which is to be run in the database-2 to have database-1 and database-2
alike ie., both schema and Data should be same
Please anyone suggest me the best solution to get the above script
This script is to be transfered to some other location in our scenario
Thanks in advance
VivekHi Sybrand Bakker,
I tried streams for the replication purpose as per your suggesion, till Iam unable make it work , i dont find a step by step document which will make it possible without error.
One more thing , i need the streams work without Database link, ie., source database is not connected directly to destination database. I need to create streams and transfer the stream as a file through FTP.I need to download stream file in remote location and then apply the streams to destination database and after this source and destination database should be same in data and schema.
Please suggest me a solution to go abt this scenario. We are in critical stage to make it happen...
thanking you in advance
with regards
vivek
Message was edited by:
Vivekanandh -
I need help writing an apple script
earlier I made an application with automater saying that when it opens it would add something to my todo list, for example, the subject being english and priority being very high. Then I made an apple script telling it to open the application I made. Then I made a mail rule telling it that if i text my computer and the text includes english and very important (english is subject and very important is the priority) it would open the apple script that tells the application i made to open and put english in my todo list. Can someone tell me how I can make a script in which it puts whatever I text my computer in my todo list, so if i text my computer anything random it would put it in my todo list
Well after a bit of head scratching I have done it! And it was simpler than I expected although I'm sure the script can be improved, it does what I want it to do. Any suggestions on improvements would be welcome.
Andy E
The script...
set artistName to text returned of (display dialog “Enter artists name:” default answer “”)
set artistSortName to text returned of (display dialog “Enter artists sort name:” default answer “”)
if artistName is “” then
set tempVer to display dialog “No artist name specified!” buttons {“OK”}
return
end if
if artistSortName is “” then
set tempVer to display dialog “No artist sort name specified!” buttons {“OK”}
return
end if
tell application “iTunes”
activate
set theLibrary to library playlist “Library”
set searchList to search theLibrary for artistName
repeat with thisTrack in searchList
set thisArtist to artist of thisTrack
if thisArtist is equal to artistName then
set sort artist of thisTrack to artistSortName
end if
end repeat
end tell
15" MacBook Pro 2.16GHz, 2GB Ram Mac OS X (10.4.10) It's my first Mac and I love it!
Maybe you are looking for
-
I followed the steps outlined in a previous message. I have a Yahoo Small Business Account. I think all of the settings are correct. I can't see any new messages on one of the accounts. One message from 7-20-14 keeps coming up over and over. When I p
-
Error while installing ECC 5.0
hello plz clear this error after giving export paths and etc i got the following error Copying file D:/ECC 5.0/dbexport1/EXPORT1/DB/ORA/DBSIZE.XML to: DBSIZE.XML. INFO 2007-05-02 02:19:18 Copying file D:/ECC 5.0/dbexport1/EXPORT1/DB/ORA/DBSIZE.XML to
-
Can I delete my sales order using a BAPI. I know it is possible using the screen transaction. But I need to do it using a BAPI ? Thanks in advance.
-
No output from java stored procedure
Hi all, I'm calling my java stored procedure as follows. In my java code I have several System.out.println statements, but none of them are displayed. Any suggestions or explanations? Thanks, Melani spool $ORACLE_BASE/local/logs/execjava_prod.log set
-
Greetings, i'm looking to deploy two Cisco 5508 WLC's in a HA pair and license them to support 150 2600e AP's. Would the BoM below be sufficient? As i understand the HA controller doesnt need licensing as in the event of the primary controller failin