Is it possible to combine a regular expression with a aritmetical expression? For example, taking a 8-numbers caracter sequece and casting each output of a grep, comparing to a constant.
THX! (2 Replies)
What does the regular expression +~).*'] mean while using it with regexec.When the string "RCHNUSNT35C~rs07/ASM-RS07" is used with the regular expression +~).*'] regexec gives an error. I know what regexec does,but i do not understand what this expression means wrt to this string...
any help... (2 Replies)
I currently list and sort all the files in a directory which begin with an Upper Case C and end with the extension '#finished#'.
Here is the command I use:
ls -tr $currentDir/*.#finished#
what i need to do now is list all the files in a directory that begin with upper case C and end... (3 Replies)
CA_RELEASE has a value of 6. I need to check if that this is a numeric value. if not error.
source $CA_VERSION_DATA
if * ]
then
echo "CA_RELESE $CA_RELEASE is invalid"
exit -1
fi
+ source /etc/ncgl/ca_version_data
++ CA_PRODUCT_ID=samxts
++ CA_RELEASE=6
++ CA_WEEK_NO=7
++... (3 Replies)
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
Hello All,
I'm trying to extract the lines between two consecutive elements of an array from a file.
My array looks like:
problem_arr=(PRS111 PRS213 PRS234)
j=0
while } ]
do
k=`expr $j + 1`
sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt
---some operation goes... (11 Replies)
Hi,
I am quite knew to scripting and I am trying to get a regular expression to work to check that a user enters a valid version number such as 1 or 1.1 or 12.3 etc. I dont seem to be able to get it to work as it picks up versions such as 1.......2. I only want it to work with a single dot.... (12 Replies)
I would like to extract "JDBC Thin Client" from (PROGRAM=JDBC Thin Client); and "C:\Python26\python.exe" from (PROGRAM=C:\Python26\python.exe); "txm_v_awsrf_db.pr" from (PROGRAM=txm_v_awsrf_db.pr).
if input line like "(PROGRAM=)", it return unknown.
Would you help suggest a regular... (4 Replies)
Discussion started by: cstsang
4 Replies
LEARN ABOUT OPENDARWIN
systemd.target
SYSTEMD.TARGET(5) systemd.target SYSTEMD.TARGET(5)NAME
systemd.target - Target unit configuration
SYNOPSIS
target.target
DESCRIPTION
A unit configuration file whose name ends in ".target" encodes information about a target unit of systemd, which is used for grouping units
and as well-known synchronization points during start-up.
This unit type has no specific options. See systemd.unit(5) for the common options of all unit configuration files. The common
configuration items are configured in the generic [Unit] and [Install] sections. A separate [Target] section does not exist, since no
target-specific options may be configured.
Target units do not offer any additional functionality on top of the generic functionality provided by units. They exist merely to group
units via dependencies (useful as boot targets), and to establish standardized names for synchronization points used in dependencies
between units. Among other things, target units are a more flexible replacement for SysV runlevels in the classic SysV init system. (And
for compatibility reasons special target units such as runlevel3.target exist which are used by the SysV runlevel compatibility code in
systemd. See systemd.special(7) for details).
IMPLICIT DEPENDENCIES
There are no implicit dependencies for target units.
DEFAULT DEPENDENCIES
The following dependencies are added unless DefaultDependencies=no is set:
o Target units will automatically complement all configured dependencies of type Wants= or Requires= with dependencies of type After=
unless DefaultDependencies=no is set in the specified units. Note that Wants= or Requires= must be defined in the target unit itself --
if you for example define Wants=some.target in some.service, the automatic ordering will not be added.
o Target units automatically gain Conflicts= dependency against shutdown.target.
EXAMPLE
Example 1. Simple standalone target
# emergency-net.target
[Unit]
Description=Emergency Mode with Networking
Requires=emergency.target systemd-networkd.service
After=emergency.target systemd-networkd.service
AllowIsolate=yes
When adding dependencies to other units, it's important to check if they set DefaultDependencies=. Service units, unless they set
DefaultDependencies=no, automatically get a dependency on sysinit.target. In this case, both emergency.target and systemd-networkd.service
have DefaultDependencies=no, so they are suitable for use in this target, and do not pull in sysinit.target.
You can now switch into this emergency mode by running systemctl isolate emergency-net.target or by passing the option
systemd.unit=emergency-net.target on the kernel command line.
Other units can have WantedBy=emergency-net.target in the [Install] section. After they are enabled using systemctl enable, they will be
started before emergency-net.target is started. It is also possible to add arbitrary units as dependencies of emergency.target without
modifying them by using systemctl add-wants.
SEE ALSO systemd(1), systemctl(1), systemd.unit(5), systemd.special(7), systemd.directives(7)systemd 237SYSTEMD.TARGET(5)