09-04-2008
Hi,
Thank you that works beautifully.
Mike
10 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
I'm trying to answer the following question about file permissions in Unix. Consider a file with the following permissions:
rwx---r--
I am not the owner of this file, but I am a member of the group of this file.
My question is: do I have read access to this file?
I thought... (3 Replies)
Discussion started by: Hook
3 Replies
2. Shell Programming and Scripting
Hi,
I'm in the midst of writing a UNIX script that sftp's files to an external host and am stuck with a problem. The problem is that the files created on my server as a order number that correlates to a sequence of directories on the remote host which is where the file should be ftp'ed.
... (3 Replies)
Discussion started by: budrito
3 Replies
3. Shell Programming and Scripting
Hello everyone,
unfortunately I am no unix nor scripting guru, which is why I am asking for help here. I am trying to reformat a .csv file using sed or awk which has the following format:
a,b,C-D-E,f,g
h,i,J,k,l
m,n,O-P-Q-R-S,t,u
v,w,X-Y,z,a
It's basically a 5-field text file which has an... (7 Replies)
Discussion started by: awayand
7 Replies
4. Shell Programming and Scripting
This post is in reference to https://www.unix.com/shell-programming-scripting/137977-tricky-sed-awk-question-post302428154.html#post302428154
I am trying to go the opposite direction now:
I have the following file:
a,b,C,f,g
a,b,D,f,g
a,b,E,f,g
h,i,J,k,l
m,n,O,t,u
m,n,P,t,u
m,n,Q,t,u... (3 Replies)
Discussion started by: awayand
3 Replies
5. UNIX for Advanced & Expert Users
Hi colleagues,
I am development a script.
this flat file pp.txt contain this tree lines.
prueba
prueba1
prueba2
cat pp.txt |awk '{print a}' |while read a
do
var=`db2 select count(*) from $a`"
echo $var
done
executing var show me error.
I need var contain: db2... (1 Reply)
Discussion started by: systemoper
1 Replies
6. UNIX for Dummies Questions & Answers
I have some large login files that I need to extract (user)@(server) from. Where it gets tricky is that there is usually more than one '@' sign on each line(although it does have a leading space if it's not part of the (user)@(server) string), I need only the (user)@(server) section, I need only... (6 Replies)
Discussion started by: Mordaris
6 Replies
7. UNIX for Dummies Questions & Answers
Delete the post. (0 Replies)
Discussion started by: yifangt
0 Replies
8. Shell Programming and Scripting
I have some data files that I can identify by a certain pattern in the names using find.
Every one of those data files has an XML file associated with it (can be multiple data files per XML file).
The XML file is always up one directory from the data file(s) in a folder calledRun##### -... (12 Replies)
Discussion started by: Michael Stora
12 Replies
9. Shell Programming and Scripting
Hey guys, my first post on UNIX Forums(much overdue IMO)!
I've got this bit of code that doesn't seem to be working correctly for an Android app I'm working on:
"screen -S gmod1 -p 0 -X stuff " & "" & command.text & "`echo -ne '\015'`"""
Basically it types command.text(variable determined... (4 Replies)
Discussion started by: stingwraith
4 Replies
10. Shell Programming and Scripting
tail -n +7 1.txt |head -n -2|awk '{print "sql", $1,"-c groom table " $5 ,"versions"}'
sql DB1 -c groom table T1 versions
sql DB2 -c groom table T2 versions
sql DB3 -c groom table T3 versions
but i want out should be
sql DB1 -c "groom table T1 versions"
sql DB2 -c "groom table T2... (3 Replies)
Discussion started by: rocking77
3 Replies
LEARN ABOUT CENTOS
perl::critic::policy::variables::prohibitaugmentedassignmentinde
Perl::Critic::Policy::Variables::ProhibitAugmentedAssignUserIContributPerl::Critic::Policy::Variables::ProhibitAugmentedAssignmentInDeclaration(3)
NAME
Perl::Critic::Policy::Variables::ProhibitAugmentedAssignmentInDeclaration - Do not write " my $foo .= 'bar'; ".
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
Variable declarations that also do initialization with '=' are common. Perl also allows you to use operators like '.=', '+=', etc., but it
it is more clear to not do so.
my $foo .= 'bar'; # same as my $foo = 'bar';
our $foo *= 2; # same as our $foo = 0;
my ( $foo, $bar ) += ( 1, 2 ); # same as my ( $foo, $bar ) = ( undef, 2 );
local $Carp::CarpLevel += 1; # same as local $Carp::CarpLevel = 1;
state $foo += 2; # adds 2 every time it's encountered
Such constructs are usually the result of botched cut-and-paste, and often are bugs. Some produce warnings.
CONFIGURATION
This Policy is not configurable except for the standard options.
AUTHOR
Mike O'Regan
COPYRIGHT
Copyright (c) 2011 Mike O'Regan. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module.
perl v5.16.3 20Perl::Critic::Policy::Variables::ProhibitAugmentedAssignmentInDeclaration(3)