does exactly what you expect, sh reads from stdin. I think it's an artifact from very antique systems. Chris F A Johnson posts here and will know definitely.
I have a text file like this with hundreds of lines:
>cat file1.txt
1027123000
1027124000
1127125000
1128140000
1228143000
>
all lines are very similar and have exactly 10 digits. I want to separate the digits by twodigit and hyphens....like so,
>
10-27-12-30-00
10-27-12-40-00... (7 Replies)
Hi,
I have a trivial question to ask, I am seeing in some shell scripts the '-' (hyphen) character following the first line of shell script (i.e) the shebang notation as follows:
#!/bin/sh -
#! /bin/bash -
what does the hyphen signify? What will happen if it is not given explicitly? (2 Replies)
Hi, I'm trying to do something relatively simple.
I have a txt file that has the following kinds of lines (and many more lines):
CP19 Oahu - Maunawili Falls
CP20 Oahu - Maunawili Falls
AG12 Oahu - Maunawili Falls
CP22 Oahu - Maunawili Falls, Local area
AG14 Oahu
CP141 KZ102 Kauai -... (7 Replies)
I want to check for more than one hyphen and then hold the first one and delete the rest of the hyphen.
I try something like this sed 's/\(*\)\1/\1/' but this doesn't work.
I try something like this sed 's/\(*\)-\1/ \1/g' but here the script delete all the hyphen.
I want to go from this : I... (2 Replies)
Hi,
I want to read a file line by line and exclude the lines that are beginning with special characters. The below code is working fine except when the line starts with hyphen (-) in the file.
for TEST in `cat $FILE | grep -E -v '#|/+' | awk '{FS=":"}NF > 0{print $1}'`
do
.
.
done
How... (4 Replies)
I'm attempting to replace a substring that contains a hyphen and not having much success, can anyone point out where i'm going wrong or suggest an alternative.
# echo /var/lib/libvirt/images/vm888b-clone.qcow | sed -e 's|vm888-clone|qaz|g'
/var/lib/libvirt/images/vm888b-clone.qcow (1 Reply)
Hey guys,
I have a file that is delimited by | and I am trying to write a sed command to
convert this:
abc|def||ghi|jkl||||mnop
into this:
abc|def|-|ghi|jkl|-|-|-|mnop
The output I am getting out of:
sed -e "s/+//g" /tmp/opt.del > /tmp/opt2.del
is like:
... (9 Replies)
I have a huge text file, about 52 GB. In the file, there are patterns like these:
]
]
]
]One can see that there is text within patterns such as and ], and I am only interested in ]. There is text before and after all these patterns too, for example,
''Anarchism''' is a ] that advocates ]... (3 Replies)
I asked this question last month in Stack Exchange (linux - delete directory with leading hyphen - Server Fault) and none of the answers supplied worked.
I have somehow created a directory with a leading hyphen and cannot get rid of it.
# ls -li | grep p
2621441 drwxr-xr-x. 2 root root... (4 Replies)
Discussion started by: edstevens
4 Replies
LEARN ABOUT CENTOS
mvn_alias
MVN_ALIAS(7) Java Packages Tools MVN_ALIAS(7)NAME
mvn_alias - add alias(es) for Maven artifact(s)
SYNOPSIS
%mvn_alias artifact-coordinates alias [alias ...]
DESCRIPTION
mvn_alias macro causes instructions for artifact installation to be added to XMvn reactor configuration. It is used to specify alternative
names (aliases) for Maven artifacts.
Specified artifact coordinates must match at least one artifact. If not then behavior is unspecified. It is possible to specify artifact
coordinates matching multiple artifacts, so one call to mvn_alias can affect installation of more than one artifact.
OPERANDS
artifact-coordinates
Artifact coordinates specify artifact(s) that this rule applies to. Coordinates are in format
groupId:artifactId[:extension[:classifier]][:version]. If extension is specified then version must be specified too. If any part is
omitted or equal to empty string then it matches any string. Wildcards and brace expansions are supported in each part. For more
information see XMvn Configuration Reference.
alias
Coordinates specifying artifact alias (alternative name under which matching artifacts will be available). Coordinates are in format
groupId:artifactId[:extension[:classifier]][:version]. If extension is specified then version must be specified too. If any part is
omitted or equal to empty string then corresponding part from artifact-coordinates will be substituted. Backreferences are supported in
form @n, where n is an integer corresponding to brace in artifact-coordinates.
AUTHOR
Originally written by Mikolaj Izdebski. Versions 3.0.0 and later were written by Stanislav Ochotnicky.
REPORTING BUGS
Bugs should be reported through Red Hat Bugzilla at http://bugzilla.redhat.com/.
SEE ALSO mvn_build(7), mvn_compat_version(7), mvn_config(7), mvn_file(7), mvn_package(7), xmvn(1).
JAVAPACKAGES 06/10/2014 MVN_ALIAS(7)