How to retrive ip address of connected device in shell script or applescript
Hi all,
From Mac PC, how to get ip address of connected device in shell script or applescript.
there is any way to launch an app on ipad in shell script or applescript.
thank you in advance for your help
Mickael
Hi all,
From Mac PC, how to get ip address of connected device in shell script or applescript.
there is any way to launch an app on ipad in shell script or applescript.
thank you in advance for your help
Mickael
Similar Messages
-
SG200-08 Loosing MAC addresses of connected devices
I have a SG200-08 Switch that has in the last month been acting up with certain types of traffic. On June 7, 2013 I installed the 1.0.6.2 firmware upgrading from 1.0.5.1. Updating the firmware has not helped.
Last week Tuesday a server that was connected to that switch disappeared from the network, looking at the trouble I had to reboot the server and traffic began to flow. After rebooting the server I found only 1 of 2 MAC addresses from the 1 NIC showing up on the port.
Today I have a Xerox Workcenter connected to the switch on another port and while working on changing settings on the device I stopping being able to reach the device, could not even ping it. I went into the switch port showed active, but no MAC address found in the dynamic table for that port. After rebooting the switch I could reach the Xerox again.
I rebooted the switch on Friday near the end of the day and it was doing better till this morning, all MAC addresses for connected devices were showing up OK. Is the device defective? It had been working OK previously, it is connected to another switch on port 1, and that shows a proper table of dynamic MAC addresses. In both cases of loosing a device it was being used not dormant or in any kind of low power mode.Dear Michael,
Thank you for reaching Small Business Support Community.
Based on the symptoms; SG200 working fine before, it seems to work ok after reboot, and latest firmware already installed. It seems to me like a hardware failure but still, in order to confirm, it would be a good idea to restore to factory conditions and configure it manually again. Just in case that does not help I suggest you to contact the Small Business Support Center for further assistance;
https://www.cisco.com/en/US/support/tsd_cisco_small_business_support_center_contacts.html
Please let me know if there is anything I can assist you with in the meantime.
Kind regards,
Jeffrey Rodriguez S. .:|:.:|:.
Cisco Customer Support Engineer
*Please rate the Post so other will know when an answer has been found. -
How to do multiple shell scripts in AppleScript
I got some solutions from previous posts on how to run sudo in Applescript, but there is still some minor syntax issues when I try to get to the destination directory. Usually in shell script I just type
cd directory-destination
in several lines to batch process those commands, but when I work with applescript, if I do do shell script for every "cd" command, instead of getting an overall result, I would get intermediate results individually.
I read doc and learned that there might be a way to put commands together by using the & sign?
Message was edited by: ttbackAn individual do shell script command runs in its own shell, so to perform multiple commands within that shell you need to combine them into a single statement. You can use the ampersand '&' operator to concatenate text strings, and the semicolon ';' to separate the commands, for example:set theFolder to "/Applications"
do shell script "cd " & theFolder & "; ls -l ."See the technical note do shell script in AppleScript. -
HT3728 how do I see IP addresses of connected devices to my airport extreme
I'm trying to reuse a Net Gear N600 router I had to shelve since I installed my Airport Extreme router as an access point. I need to see other IP addresses so I can configure the N600 IP address as 10.0.1.xxx. The only way to make sure I don't use an already used IP address for the N600 is to see what IP addresses are used by the system.
The only support I've found here is how to set up a distributed network using other apple airport extreme devices.
Has anyone done/added a second non-apple router configured as an access point to an airport extreme. If you have please let me know what you did. I intend to have the N600 connected via ethernet cable to my airport extreme to extend both my wifi network and connected devices.
Thanks,
StevenDownload the fing app on an iOS device
-
WRT54G and IP Address of Connected Devices
An HP laser printer and a DLink network drive are among the various devices connected to my network via a WRT54G and an eight port switch. Every now and then the IP addresses for these two devices change. With respect to the printer, this means I cannot depend on reliably printing something and I periodically have to delete the printer and reinstalli it on the various computers. This also presents a problem with the DLink drive because when the address changes the mapping of it as a lettered drive on each computer is no longer valid.
How can I fix the IP addresses of these network devices so it does not change?Set static IP addresses on the devices. You can't change it on the WRT.
(unless your WRT54G has a firmware which has a dhcp reservation function in the web interface, but think the WRT54G is too old for that. For that it would be helpful to know which model & version you have exactly as printed on the label underneath the router and which firmware version you are running as shown in the web interface). -
How to get IP address of wp8 device
How to simply retrieve IP address of wp8 device?
microsoft.Phone.Net.NetworkInformation has too many classes related to networkinfo but none of them give IP address.see this link
http://www.c-sharpcorner.com/UploadFile/2b876a/how-to-get-ip-address-in-windows-phone-8/ -
How to find MAC-Address of a device using ADF mobile?
Hi,
I am developing an mobile application using ADF Mobile. The application necessitates the use of MAC Address for further development.
Android SDK provides an easy way to find the MAC Address as:
WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
WifiInfo wInfo = wifiManager.getConnectionInfo();
String macAddress = wInfo.getMacAddress();
Is there a similar way in ADF mobile to retrieve the MAC Address of the device?
Regards,
JosephThis cant be done.
-
How Can i get PLSQL Procedure out values in Shell Script?
Hi,
I need to use PLSQL Procedure out values in shell script by using that parameter i need to check and call the other procedure. Please can you guide me how can i?
#!/bin/ksh
# Function to call validation program
SQL_PKG_CALL()
echo "Inside SQL_PKG_CALL for $file"
sqlplus -s /nolog << EOF
whenever sqlerror exit failure
connect ${APPS_LOGIN}
variable exit_value NUMBER
set serveroutput on size 100000
DECLARE
l_errbuf VARCHAR2(10000) := NULL; l_retcode NUMBER := NULL;lv_test VARCHAR2(4000) := NULL;
BEGIN
fnd_global.apps_initialize ( USER_ID => ${USER_ID}, RESP_ID => ${RESP_ID}, RESP_APPL_ID => ${RESP_APPL_ID}
, SECURITY_GROUP_ID => ${SECURITY_GROUP_ID}
#Calling PLSQL procedure for create and attache document
XXAFPEEP_SO_DOC_ATTACH_INT.DOCUMENT_ATTACH (p_errbuf => l_errbuf, p_retcode => :RETMSG, p_fileName => $file
, p_debug => 'Y', p_rettest => lv_test);
# to print the procedure return values
DBMS_OUT.PUT_LINE('Return Message: '|| lv_test);
#${RETCODE}=l_retcode;
print :RETMSG;
END;
EXIT 0
EOF
# Program starts here
echo "+---------------------------------------------------------------------------+"
echo "Program Start"
APPS_LOGIN=${1} # Apps Login
USER_ID=${2} # User ID
RESP_ID=${5} # Responsiblity ID
RESP_APPL_ID=${6} # Responsiblity Application ID
SECURITY_GROUP_ID=${7} # Security Group ID
DIRECTORY_PATH=${8} # Directory --Attached file locations
DIRECTORY_NAME=${9} # Directory Name for plsql
echo "User ID : $USER_ID"
echo "Responsibility ID : $RESP_ID"
echo "Responsibilith Application ID : $RESP_APPL_ID"
echo "Security Goup ID : $SECURITY_GROUP_ID"
echo "Directory Path : $DIRECTORY_PATH"
echo "Direcotry Name : $DIRECTORY_NAME"
echo
#files direcotry
cd $DIRECTORY_PATH
echo Present Working Directory: `pwd`
echo
#for all file names
ALL_FILES=`ls *.pdf`
for file in $ALL_FILES
do
if [ -f $file ]
then
#log "Processing $file" # future
echo Processing: $file
# Calling the PL/SQL Program
SQL_PKG_CALL;
#echo "Retcode : $RETCODE"
echo "RetMessage : $RETMSG"
else
log "Skipped $file: invalid file"
echo "Skipping current file $file: not a valid file."
fi
done
Thanks
SudheerSaubhik's provided the solution, but just for fun:
Test procedure:
create or replace procedure get_ename
( p_empno in emp.empno%type
, p_ename_out out emp.ename%type )
is
begin
select ename into p_ename_out
from emp
where empno = p_empno;
end get_ename;Test data:
SQL> select empno, ename from emp order by 1;
EMPNO ENAME
7369 SMITH
7499 ALLEN
7521 WARD
7566 JONES
7654 MARTIN
7698 BLAKE
7782 CLARK
7788 SCOTT
7839 KING
7844 TURNER
7876 ADAMS
7900 JAMES
7902 FORD
7934 MILLER
14 rows selectedTest call from SQL*Plus to show it working:
SQL> declare
2 v_ename emp.ename%type;
3 begin
4 get_ename(7844,v_ename);
5 dbms_output.put_line(v_ename);
6 end;
7 /
TURNER
PL/SQL procedure successfully completed.Demo shellscript (borrowing the function idea from Saubhik):
#!/bin/ksh
empno=${1:-NULL}
exec_sql() {
sqlplus -s william/w@//vm.starbase.local:1521/eleven <<END_SQL
spool get_out_value.sh.log
set serverout on size 2000 feedback off
declare
v_name emp.ename%type;
begin
get_ename(${empno},v_name);
dbms_output.put_line('# ' || v_name);
end;
spool off
exit
END_SQL
ename=$(exec_sql ${empno} | awk '/^# / {print $2}')
print Employee ${empno} = ${ename}Demo:
/Users/williamr: get_out_value.sh 7844
Employee 7844 = TURNER
/Users/williamr: get_out_value.sh
Employee NULL =Note this substitutes the word NULL if no empno is passed, and it ignores error output or anything else by only looking for lines beginning '# ' and then taking the following word. Error messages will appear in the logfile. (In this example it probably doesn't need the NULL substitution because a missing parameter would cause a syntax error which the script will handle anyway, but it could be useful in more complex examples.)
For a production script you should probably use an OS authenticated account so you don't have to deal with password strings. -
I would like to create a workflow in Automator or a script in AppleScript (or a combination of the two), that opens Safari to a specified page and downloads an excel file from this page and saves the downloaded document to my desktop.
Is this something that be done? If so, how?
I have so far been able to build a workflow in Automator to open Safari and added an AppleScript that takes Safari to a specific page that has an Excel document.
I can't figure out where to go from here... Any help would be apprecitated.
Thanks!Would you have the web address the excel sheet is on?
Is there a simular web page you could point to if not?
Would there be a copy of the file on an FTP page. This would be easier.
curl
http://www.cyberciti.biz/faq/mac-os-x-terminal-download-file/
http://www.thegeekstuff.com/2012/04/curl-examples/
http://curl.haxx.se/docs/manpage.html
Macintosh-HD -> Applications -> Utilities -> Terminal
# Press return to run a command.
the curl is a terminal command ( Unix ). It allows you to read a file off of the web.
man curl
provides cryptic information on the commnad curl.
press the space bar to advance a page.
press letter to q to quit.
What you may have to is to read in the web page as a text file. Go "fishing" through the page to find the excel file you need. Once you find the file, you can use curl to read the file.
curl is a very full featured command. (read complex to figure out ).
It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on. Here is an example.
Author: rccharles
For testing, run in the Script Editor.
1) Click on the Event Log tab to see the output from the log statement
2) Click on Run
For running shell commands see:
http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
on run
-- Write a message into the event log.
log " --- Starting on " & ((current date) as string) & " --- "
-- debug lines
set desktopPath to (path to desktop) as string
log "desktopPath = " & desktopPath
set unixDesktopPath to POSIX path of desktopPath
log "unixDesktopPath = " & unixDesktopPath
set quotedUnixDesktopPath to quoted form of unixDesktopPath
log "quoted form is " & quotedUnixDesktopPath
try
set fromUnix to do shell script "ls -l " & quotedUnixDesktopPath
display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
on error errMsg
log "ls -l error..." & errMsg
end try
end run -
BI Admin Tool - Setting connection pool via shell script - Is it possible?
Hi,
Here's the problem I am trying to solve.
I am using a J2EE application that uses OBIEE for reporting.
The *.rpd file is installed at a particular location when our J2EE product is installed.
I then copy the *.rpd file to the BI home on a different server using a shell script.
The shell script that deploys the *.rpd file does the following:
1. Shuts down BI processes that are running
2. Deletes the old *.rpd file
3. Copies the new *.rpd file
4. Starts all BI processes
I am happy with the way we have automated this process, but would like to take it one step further.
The *.rpd file does not have the connection pool hard-coded in it. And we want to keep it that way.
What we would like to do is - pass the connection pool parameters to the shell script (that is used for *.rpd's deployment) and have it automatically update the *.rpd file. Is it possible to do this at all? How do we go about accomplishing this?
Or in other words - Is there a way to update the connection pools WITHOUT hard-coding it in the *.rpd file or WITHOUT using the BI Administration Tool.
Currently, we manually update the connection pools in the Physical Layer using the Oracle BI Administration Tool.
The version of BI Administration Tool being used is 10.1.3.3.1 installed on a Microsoft Windows XP Professional SP2 machine. The BI Server itself is running on an Oracle Enterprise Linux 4.0 box.
Do let me know if you need more information that would help answer this question.
Thank you.Thank you - fiston and Gagan.
I am going with fiston's solution - since it is easier to implement. I am on the QA team and the automated deployment is to lessen QA's deployment time.
While one of our developer's said that she prefer's Gagan's solution - it would be over-kill to make changes to the application's schema for the said purpose.
I will further make another post as to whether or not the automated deployment worked for us. -
How to get ORA errors in alertlog file using shell script.
Hi,
Can anyone tell me how to get all ORA errors between two particular times in an alertlog file using shell script.
ThanksHi,
You can define the alert log as an external table, and extract messages with SQL, very cool:
http://www.dba-oracle.com/t_oracle_alert_log_sql_external_tables.htm
If you want to write a shell script to scan the alert log, see here:
http://www.rampant-books.com/book_2007_1_shell_scripting.htm
#!/bin/ksh
# log monitoring script
# report all errors (and specific warnings) in the alert log
# which have occurred since the date
# and time in last_alerttime_$ORACLE_SID.txt
# parameters:
# 1) ORACLE_SID
# 2) optional alert exclusion file [default = alert_logmon.excl]
# exclude file format:
# error_number error_number
# error_number ...
# i.e. a string of numbers with the ORA- and any leading zeroes that appear
# e.g. (NB the examples are NOT normally excluded)
# ORA-07552 ORA-08006 ORA-12819
# ORA-01555 ORA-07553
BASEDIR=$(dirname $0)
if [ $# -lt 1 ]; then
echo "usage: $(basename) ORACLE_SID [exclude file]"
exit -1
fi
export ORACLE_SID=$1
if [ ! -z "$2" ]; then
EXCLFILE=$2
else
EXCLFILE=$BASEDIR/alert_logmon.excl
fi
LASTALERT=$BASEDIR/last_alerttime_$ORACLE_SID.txt
if [ ! -f $EXCLFILE ]; then
echo "alert exclusion ($EXCLFILE) file not found!"
exit -1
fi
# establish alert file location
export ORAENV_ASK=NO
export PATH=$PATH:/usr/local/bin
. oraenv
DPATH=`sqlplus -s "/ as sysdba" <<!EOF
set pages 0
set lines 160
set verify off
set feedback off
select replace(value,'?','$ORACLE_HOME')
from v\\\$parameter
where name = 'background_dump_dest';
!EOF
`
if [ ! -d "$DPATH" ]; then
echo "Script Error - bdump path found as $DPATH"
exit -1
fi
ALOG=${DPATH}/alert_${ORACLE_SID}.log
# now create awk file
cat > $BASEDIR/awkfile.awk<<!EOF
BEGIN {
# first get excluded error list
excldata="";
while (getline < "$EXCLFILE" > 0)
{ excldata=excldata " " \$0; }
print excldata
# get time of last error
if (getline < "$LASTALERT" < 1)
{ olddate = "00000000 00:00:00" }
else
{ olddate=\$0; }
errct = 0; errfound = 0;
{ if ( \$0 ~ /Sun/ || /Mon/ || /Tue/ || /Wed/ || /Thu/ || /Fri/ || /Sat/ )
{ if (dtconv(\$3, \$2, \$5, \$4) <= olddate)
{ # get next record from file
next; # get next record from file
# here we are now processing errors
OLDLINE=\$0; # store date, possibly of error, or else to be discarded
while (getline > 0)
{ if (\$0 ~ /Sun/ || /Mon/ || /Tue/ || /Wed/ || /Thu/ || /Fri/ || /Sat/ )
{ if (errfound > 0)
{ printf ("%s<BR>",OLDLINE); }
OLDLINE = \$0; # no error, clear and start again
errfound = 0;
# save the date for next run
olddate = dtconv(\$3, \$2, \$5, \$4);
continue;
OLDLINE = sprintf("%s<BR>%s",OLDLINE,\$0);
if ( \$0 ~ /ORA-/ || /[Ff]uzzy/ )
{ # extract the error
errloc=index(\$0,"ORA-")
if (errloc > 0)
{ oraerr=substr(\$0,errloc);
if (index(oraerr,":") < 1)
{ oraloc2=index(oraerr," ") }
else
{ oraloc2=index(oraerr,":") }
oraloc2=oraloc2-1;
oraerr=substr(oraerr,1,oraloc2);
if (index(excldata,oraerr) < 1)
{ errfound = errfound +1; }
else # treat fuzzy as errors
{ errfound = errfound +1; }
END {
if (errfound > 0)
{ printf ("%s<BR>",OLDLINE); }
print olddate > "$LASTALERT";
function dtconv (dd, mon, yyyy, tim, sortdate) {
mth=index("JanFebMarAprMayJunJulAugSepOctNovDec",mon);
if (mth < 1)
{ return "00000000 00:00:00" };
# now get month number - make to complete multiple of three and divide
mth=(mth+2)/3;
sortdate=sprintf("%04d%02d%02d %s",yyyy,mth,dd,tim);
return sortdate;
!EOF
ERRMESS=$(nawk -f $BASEDIR/awkfile.awk $ALOG)
ERRCT=$(echo $ERRMESS|awk 'BEGIN {RS="<BR>"} END {print NR}')
rm $LASTALERT
if [ $ERRCT -gt 1 ]; then
echo "$ERRCT Errors Found \n"
echo "$ERRMESS"|nawk 'BEGIN {FS="<BR>"}{for (i=1;NF>=i;i++) {print $i}}'
exit 2
fi -
How to switch user from the current user using shell script code
Hi Experts,
I have an requirement to login into a particular user from the shell script concurrent program. I do have credentials for that particular user. I want to login and run few commands from that particular user. Please let me know if there are any methods to login as a particular user using the username, password from shell script program.
Thanks a lot.Thanks for your reply. However we cannot use su command from a shell script program. How to enter password from shell script program?http://tinyurl.com/3t7cwjh
Thanks,
Hussein -
How to Compile the PL/SQL Package/ Procedure using shell script
Hi,
I tried to Compiled the shell script but I am facing some error.
Can any one help me how to compile the PL/SQL shell script without error. Awaiting for your valuable reply.
Thanks,
Arun Prakashuser8726849 wrote:
PL/SQL shell script without errorWhat's a PL/SQL shell script?
Can you please post exactly what you are trying to do (As in the actual code that you are executing and its output)? Also please post it in \ tags (See FAQ). -
Test ssh -ND connection in a shell script
I use a web proxy with firefox by setting up this ssh tunnel:
ssh -ND 8080 [email protected]
Is there a shell script way (like with nc) I can test this connection?Hi Bill,
I don't know if I'll be able to provide all of the help I'd like to because I have to get ready to go out of town. You used Fink to install "wget", right? "wget" will do almost anything a browser will do so I can't think of a better way to test from the command line. If you don't have "wget", "curl" will do. Is that what you had in mind? You can probably do it with "telnet" but "wget" understands complex URLs which, to my taste, is an easier way to specify the port.
Gary
~~~~
Lizzie Borden took an axe,
And plunged it deep into the VAX;
Don't you envy people who
Do all the things YOU want to do? -
CUOM - How to add IP address with hostname (device name)
Hello all,
I have a quick question regarding CUOM(Operation Manager).
How I could add devices' hostname to CUOM for monitoring?
I could add IP address as below , if I only add IP address, then it looks NO "device name' field which I could add.
Devices ->Device Management->Add Devices
Thank you for your help in advance.
HowardIt is resolved by updating host file on CUOM server.
Maybe you are looking for
-
How do I install x11 w/o install disk?
How do I install x11 on tiger without the install disk? I just spent the past hour tearing my house apart trying to find the install disk, but no luck. I have no idea where it is.
-
Hello i want to install macosx tiger on my iBook G4 12" The installation dvd is the original provided with the iBook. Currently i have macosx 10.4. The probleme is that this computer was repaired by apple (motherboard changed) but they created an acc
-
Template size 400KB, my site 40000KB
Hi, I downloaded a template and then used it to create a website. The website I created is HUGE KB wise and takes absolutely forever to load, but there isn't much on it per se. How do I decrease the file size? Should I delete all the pictures that th
-
Where can I find this presentation format?
Can Keynote create presentations that look like this: http://www.entrepreneur.com/blog/224640?cam=Dev&ctp=Carousel&cdt=22&cdn=224640 (middle of page)? Or, is there an app that can create something similar?
-
Is Central Search Searchable Via Upper and Lower Case Letters
Good evening, Does anyone know if Central Search is searchable using both upper and lower case letters? We have the functionality enabled and can only bring back search results when we use upper case letters. When we search on the same marketing ob