requesting available port with shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting requesting available port with shell script
# 1  
Old 04-16-2010
requesting available port with shell script

how do I request a new and available local port (TCP) to use with shell script?
# 2  
Old 04-16-2010
Quote:
Originally Posted by timmylita
how do I request a new and available local port (TCP) to use with shell script?
MAybe you can use the network status command
Code:
netstat -na

and check the ports if the port you want is allready used or not. Namely you can use port and for its availability status from netstat command output inside a comparative loop
# 3  
Old 04-16-2010
If you have nmap on your system then try that
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash script, find the next closed (not in use) port from some port range.

hi, i would like to create a bash script that check which port in my Linux server are closed (not in use) from a specific range, port range (3000-3010). the print output need to be only 1 port, and it will be nice if the output will be saved as a variable or in same file. my code is: ... (2 Replies)
Discussion started by: yossi
2 Replies

2. Shell Programming and Scripting

Requesting help for TL1 scripting

HI Everyone, I have TL1 script which takes the temperature of a CISCO equipment through TELNET now i need to save the output of the command to a csv file . Like this is the output > RTRV-SHELFSTAT:AB1S2a::1; AB1S2a 2016-02-03 22:29:39 M 1 COMPLD ... (2 Replies)
Discussion started by: adgjmpt
2 Replies

3. Solaris

How to find port number wwn of particular port on dual port HBA,?

please find the below o/p for your reference bash-3.00# fcinfo hba-port HBA Port WWN: 21000024ff295a34 OS Device Name: /dev/cfg/c2 Manufacturer: QLogic Corp. Model: 375-3356-02 Firmware Version: 05.03.02 FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies

4. UNIX for Dummies Questions & Answers

Shell Script to test telnet connection using port

Hello, I need to test telnet connections using port number for few hosts. Could you please help me? Thanks !! (1 Reply)
Discussion started by: skhichi
1 Replies

5. Post Here to Contact Site Administrators and Moderators

Requesting a new forum

Hi admins and moderators!! Happy new year and merry Christmas :D Well, I have been here a few months now as a registered member and may be 6-7 years that I got numerous help directly and indirectly from this site as a guest. Unix.com really has a vast collection of posts on wide variety of... (15 Replies)
Discussion started by: admin_xor
15 Replies

6. Shell Programming and Scripting

Requesting help with shell script

I have been viewing man pages and using google with little luck so far. I am writing a shell script using wbemcli. I can execute the command and get the results I need just fine. ex. wbemcli -nl ein 'http://<username>:<password>@<host>/<targetpc>/root/wmi:MSAcpi_ThermalZoneTemperature' ... (3 Replies)
Discussion started by: Scott Post
3 Replies

7. Shell Programming and Scripting

Requesting help to replace a string by my bash script

Hello every1, I need help to replace a string in a file by my bash script. Find: log4j.appender.toLogFile.layout.ConversionPattern= %d %5p (%F:%L) - %m%n= %d %5p (%F:%L) - %m%n Replace: log4j.appender.toLogFile.layout.ConversionPattern= %d %5p (%F:%L) - %m%n I tried by sed, but kept... (7 Replies)
Discussion started by: titanic4u
7 Replies

8. Shell Programming and Scripting

Requesting full back up scripts

hi guys linux noob here wanting to learn linux scripting, i need help with a backup script that not only allows me to back up my files but restore them to my own personal directory, had a look at some of the coding from the scripts section on this site but still lost. any help is much appreciated (8 Replies)
Discussion started by: burnie35
8 Replies

9. Shell Programming and Scripting

Requesting input and for loop

Test - Test (1 Reply)
Discussion started by: Amit Sura
1 Replies

10. Shell Programming and Scripting

port scan shell script

Hi, Can any one please suggest me commands for making port scan shell script. (3 Replies)
Discussion started by: nrbhole
3 Replies
Login or Register to Ask a Question