[root@tblmanh236 test]# cat $LOG[123] > mySingleLogfile.log
cat: [123]: No such file or directory
I am getting the following error because of the [ ] brackets around 123 , I guess
No. Let me explain that: It seems like you exported variables LOG1 LOG2 and LOG3, but here you are "catting" $LOG[123]. Most likely, LOG is not defined at all and hence empty, and only [123] remains and cat cannot find a file with name [123]. The shell treated it like a literal filename [123] because the shell was not able to expand it to something appropriate. [123] alone would match only files with name 12 and 3
One potential solution:
Is it viable?
Edit: This should work too:
Last edited by junior-helper; 12-10-2014 at 01:29 PM..
This User Gave Thanks to junior-helper For This Post:
Hi Guru's,
I need to create 3 files with the contents "ABC" using single command.
Iam using:
echo "ABC" > file1.txt file2.txt file3.txt
the above command is not working. pls help me...
With Regards / Ganapati (4 Replies)
File1 row is same as column 2 in file 2.
Also file 2 will either start with A, B or C.
And 3rd column in file 2 is always F2.
When column 2 of file 2 matches file1 column, print all those rows into a separate file.
Here is an example.
file 1:
100
103
104
108
file 2:
... (6 Replies)
file1 has pgap500 500
file2 has bunch of data
cat file1 file2 > file3
cp file2 file3.dat then vi pgap500 500 onto 1st line
compare file3 and fil3.dat, they are not the same.
any idea ? the 1st line, i want to put pg500 xxx
---------- Post updated at 07:35 AM ---------- Previous... (2 Replies)
hi;
my file2.txt:portname=1;list=10.11;l-
portname=2;list=10.12;l-
portname=3;list=10.13;l-
...
my file1.txt:;"{'sector=%27'}"\&>
so; i want to see:portname=1;list=10.11;l-;"{'sector=%27'}"\&>
portname=2;list=10.12;l-;"{'sector=%27'}"\&>
portname=3;list=10.13;l-;"{'sector=%27'}"\&>... (4 Replies)
I have very limited coding skills but I'm wondering if someone could help me with this. There are many threads about matching strings in two files, but I have no idea how to add a column from one file to another based on a matching string.
I'm looking to match column1 in file1 to the number... (3 Replies)
Hi all,
My requirement is that i have two files file1 and file2. file1 content is present in file2. i want to have a final which will have file2 contents but not the contents of file1 so I am running below command.
fgrep -vf file1 file2>file3
no of records in file1 is 65282
no of records... (10 Replies)
I'm trying to use awk to do the following. I have file1 with many lines, each containing 5 fields describing an individual set. I have file2 which is a template config file with variable space holders to be replaced by the values in file1. I would like to substitute each set of values in file1 with... (6 Replies)
Hi
I have two files file1 and file2
File1 10,000 entries:It has 3 columns below.
conn=232257 client=xxx.xxx.xx.xxx:60491 protocol=LDAP
File2 has 500 entries It has two columns.
conn=232257 dn="uid=xxxx,ou=xxxx,ou=xxxx,dc=xxxxx,dc=xxxx"
conn=232398... (10 Replies)
Hi everyone,
I would like to complete the following could you please find some time and help me to achieve below:
File 1 has a list of IP address (more than 1k)
File1:1.1.1.1
2.2.2.2
1.1.1.2
3.3.3.3
2.3.3.2File 2 has content like this:Internet 11.165.91.244 0 Incomplete ... (4 Replies)
file1
cat
dog
fish
file2
This is a bunch of lines
<!-- INSERT ANIMALS HERE -->
horse
cheetah
post results
file2
This is a bunch of lines
<!-- INSERT ANIMALS HERE -->
cat
dog
fish
horse (1 Reply)
Discussion started by: TY718
1 Replies
LEARN ABOUT DEBIAN
jifty::manual::logging
Jifty::Manual::Logging(3pm) User Contributed Perl Documentation Jifty::Manual::Logging(3pm)NAME
Jifty::Manual::Logging - Using and controlling Jifty's logging system
Intro
Jifty uses the Log4perl module for logging messages, so you can define your own log4perl config for logging.
You can define different behaviour for different log levels. For example, you can send mail to administrator when error occurred, or add
color to warning messages that are logged to the terminal.
Config from config.yml
Various log level config can be set from etc/config.yml or etc/site_config.yml.
Example
# vim:filetype=conf:et:
log4perl.rootLogger = INFO , Screen
log4perl.logger.MyApp.MailNotifier = WARN, Mailer
log4perl.appender.LOG1 = Log::Log4perl::Appender::File
log4perl.appender.LOG1.filename = apache_fastcgi/logs/
log4perl.appender.LOG1.mode = append
log4perl.appender.LOG1.layout = Log::Log4perl::Layout::PatternLayout
log4perl.appender.LOG1.layout.ConversionPattern = %d %p %m %n
log4perl.appender.Mailer = Log::Dispatch::Email::MailSend
log4perl.appender.Mailer.to = admin@blah.com
log4perl.appender.Mailer.subject = !!ERROR!!
log4perl.appender.Mailer.layout = SimpleLayout
log4perl.filter.Filter1 = sub { /Plugin/ }
log4perl.filter.FilterRule = Log::Log4perl::Filter::Boolean
log4perl.filter.FilterRule.logic = Filter1
log4perl.appender.LOG1.Filter = FilterRule
log4perl.appender.ScreenColor = Log::Log4perl::Appender::ScreenColoredLevels
log4perl.appender.ScreenColor.layout = SimpleLayout
log4perl.appender.Screen = Log::Log4perl::Appender::Screen
log4perl.appender.Screen.layout = SimpleLayout
perl v5.14.2 2010-12-08 Jifty::Manual::Logging(3pm)