08-04-2008
In your example, why did you remove the 0 from the beginning of the foo and foo1 lines, but not the orange line? That's the confusing part...
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file that looks like this:
/home/fred/opt/bin
/opt/usr/bin
/usr/sbin/var/opt
I need a way to chop of everything after the last occurance of the / sign including the /. So the file above will now look like this below.
/home/fred/opt
/opt/usr
/usr/sbin/var
I tried using... (6 Replies)
Discussion started by: x96riley3
6 Replies
2. Shell Programming and Scripting
I have a list of servers that I need my script to ping however this list also has the env they belong too such as SIT, PRD, warehouse and so on.
The break character for each section is :
A value in my list would look like this...
brutus.grhq.xxx.com:warehouse
Where brutus.grhq.gfs.com is... (13 Replies)
Discussion started by: LRoberts
13 Replies
3. Shell Programming and Scripting
awk -F"\t" -vOFS="\t" '{print $1"\t-\t-","",$6,$7"\t-"$8"\t-\t-\t"$15}' file.tsv > output.tsv
Using the above command how to remove the string www.abc.com from the $7 value. (7 Replies)
Discussion started by: sandy1028
7 Replies
4. UNIX for Dummies Questions & Answers
I need to compile a large amount of data with a common string from individual text files throughout many directories.
An example data file is below. I want to search for the following string, "cc_sectors_1" and combine all the data from each file which contains this string, into one new... (2 Replies)
Discussion started by: GradStudent2010
2 Replies
5. Shell Programming and Scripting
Hi all,
I have one file that is in the form:
S0243K05_T7_S0243K05_|_BASS2243.C7_K05 groupVI. 88.76
S0137F20_SP6_S0137F20_|_BASS2137d.SPB2.2_C10 groupXXI 88.06
S0056F03_T7_S0056F03_|_BASS256c.C7_C02 groupXIX 85.99
S0056F03_T7_S0056F03_|_BASS256c.C7_C02 groupXIX 83.23... (3 Replies)
Discussion started by: repiv
3 Replies
6. Shell Programming and Scripting
Hello,
I'm interested in finding all occurrences of the terms in file1 in file2, which are both csv files. I can do this with a loop but I'm interested in knowing if I can also do it with the help of xargs and grep. What I have tried:
cat file1 | xargs grep file2
The problem is that... (15 Replies)
Discussion started by: eon
15 Replies
7. Shell Programming and Scripting
Hello I have two vars loaded with
$VAR1="ISOMETHING103"
$VAR2="COTHERTHING04"
I need to:
1) Strip the first char. Could be sed 's/^.//'
2) The number has it's rules. If it has "hundreds", it needs to be striped.
If it is just two digits it shouldn't.
So, for VAR1 output should be... (7 Replies)
Discussion started by: tristezo2k
7 Replies
8. Shell Programming and Scripting
Hi,
Need your help for this scripting issue I have. I am not really good at this, so seeking your help.
I have a file looking similar to this:
Hello, i am human and name=ABCD.
How are you?
Hello, i am human and name=PQRS.
I am good.
Hello, i am human and name=ABCD.
Good bye.
Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies
9. UNIX for Beginners Questions & Answers
Hi,
Let's say I have a pipe-separated input like so:
name_10|A|BCCC|cat_1
name_11|B|DE|cat_2
name_10|A|BC|cat_3
name_11|B|DEEEEEE|cat_4
Using awk, for records with common field 2, I am trying to replace all the shortest substrings by the longest string in field 3.
In order to get the... (5 Replies)
Discussion started by: beca123456
5 Replies
LEARN ABOUT DEBIAN
module::manifest::skip
Module::Manifest::Skip(3pm) User Contributed Perl Documentation Module::Manifest::Skip(3pm)
NAME
Module::Manifest::Skip - MANIFEST.SKIP Manangement for Modules
SYNOPSIS
From the command line:
> perl -MModule::Manifest::Skip=create
From Perl:
use Module::Manifest::Skip;
use IO::All;
my $mms = Module::Manifest::Skip->new;
# optional add and removes:
$mms->add('^foo-bar$');
$mms->remove('^foo$');
$mms->remove(qr/Qfoo/);
io('MANIFEST.SKIP')->print($mms->text);
DESCRIPTION
NOTE: This module is mostly intended for module packaging frameworks to share a common, up-to-date "MANIFEST.SKIP" base. For example,
Module::Install::ManifestSkip, uses this module to get the actual SKIP content. However this module may be useful for any module author.
CPAN module authors use a MANIFEST.SKIP file to exclude certain well known files from getting put into a generated MANIFEST file, which
would cause them to go into the final distribution package.
The packaging tools try to automatically skip things for you, but if you add one of your own entries, you have to add all the common ones
yourself. This module attempts to make all of this boring process as simple and reliable as possible.
Module::Manifest::Skip can create or update a MANIFEST.SKIP file for you. You can add your own entries, and it will leave them alone. You
can even tell it to not skip certain entries that it normally skips, although this is rarely needed.
USAGE
Usually this module is called by other packaging modules. If you want this to be used by Module::Install, then you would put this:
manifest_skip 'clean';
in your Makefile.PL, and everything would be taken care of for you.
If you want to simply create a MANIFEST.SKIP file from the command line, this handy syntax exists:
> perl -MModule::Manifest::Skip=create
BEHAVIOR
This module ships with a share file called share/MANIFEST.SKIP. This is the basis for all new MANIFEST.SKIP files. This module will look
for an already existing MANIFEST.SKIP file and take all the text before the first blank line, and prepend it to the start of a new SKIP
file. This allows you to put your own personal section at the top, that will not be overwritten later.
It will then look for lines beginning with a dash followed by a space. Like this:
- foo
- ^bar/
- ^baz$
It will comment out each of these lines and any other lines that match the text (after the '- '). This allows you to override the default
SKIPs.
AUTHOR
Ingy doet Net
COPYRIGHT AND LICENSE
Copyright (c) 2011. Ingy doet Net.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
perl v5.14.2 2011-10-08 Module::Manifest::Skip(3pm)