how do I request a new and available local port (TCP) to use with shell script?
MAybe you can use the network status command
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
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)
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)
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
6. Post Here to Contact Site Administrators and Moderators
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)
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)
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
LEARN ABOUT FREEBSD
atf-sh
ATF-SH(1) BSD General Commands Manual ATF-SH(1)NAME
atf-sh [-s shell] -- interpreter for shell-based test programs
SYNOPSIS
atf-sh script
DESCRIPTION
atf-sh is an interpreter that runs the test program given in script after loading the atf-sh(3) library.
atf-sh is not a real interpreter though: it is just a wrapper around the system-wide shell defined by ATF_SHELL. atf-sh executes the inter-
preter, loads the atf-sh(3) library and then runs the script. You must consider atf-sh to be a POSIX shell by default and thus should not
use any non-standard extensions.
The following options are available:
-s shell Specifies the shell to use instead of the value provided by ATF_SHELL.
ENVIRONMENT
ATF_LIBEXECDIR Overrides the builtin directory where atf-sh is located. Should not be overridden other than for testing purposes.
ATF_PKGDATADIR Overrides the builtin directory where libatf-sh.subr is located. Should not be overridden other than for testing purposes.
ATF_SHELL Path to the system shell to be used in the generated scripts. Scripts must not rely on this variable being set to select a
specific interpreter.
EXAMPLES
Scripts using atf-sh(3) should start with:
#! /usr/bin/env atf-sh
Alternatively, if you want to explicitly choose a shell interpreter, you cannot rely on env(1) to find atf-sh. Instead, you have to hardcode
the path to atf-sh in the script and then use the -s option afterwards as a single parameter:
#! /path/to/bin/atf-sh -s/bin/bash
ENVIRONMENT
ATF_SHELL Path to the system shell to be used in the generated scripts.
SEE ALSO atf-sh(3)BSD September 27, 2014 BSD