Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y"
#!/bin/bash
du -hs $1
while read SIZE ENTRY
do
if ;
then
find $1 -mtime +$2 -exec rm -f {} \;
echo "Files older than $2 days deleted"
else
echo "free Space available"... (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
If I enter (simplified):
find . -printf "%p\n"
then all files in the output are prepended by a "." like
./local/share/test23.log
How can achieve that
a.) the leading "./" is omitted
and/or
b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Hi ,
i have some files of specific pattern ...i need to look for files which are having size greater than zero and move those files to another directory..
Ex...
abc_0702,
abc_0709,
abc_782
abc_1234 ...etc
need to find out which is having the size >0 and move those to target directory..... (7 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hi everyone,
I have a problem but I have never installed a separate OS before so my lingo and understanding may not be as good as some of you. I will try and explain my problem best I can. I am trying to instead of loading Windows 7 when my computer starts up, for it to start linux specifically... (2 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
LEARN ABOUT REDHAT
apache::testconfig
Apache::TestConfig(3) User Contributed Perl Documentation Apache::TestConfig(3)NAME
Apache::TestConfig -- Test Configuration setup module
SYNOPSIS
use Apache::TestConfig;
my $cfg = Apache::TestConfig->new(%args)
my $fh = $cfg->genfile($file);
$cfg->writefile($file, $content);
$cfg->gendir($dir);
...
DESCRIPTION
"Apache::TestConfig" is used in creating the "Apache::Test" configuration files.
FUNCTIONS
genwarning()
my $warn = $cfg->genwarning($filename)
genwarning() returns a warning string as a comment, saying that the file was autogenerated and that it's not a good idea to modify this
file. After the warning a perl trace of calls to this this function is appended. This trace is useful for finding what code has created
the file.
genwarning() automatically recognizes the comment type based on the file extension. If the extension is not recognized, the default "#"
style is used.
Currently it support "<!-- -->", "/* ... */" and "#" styles.
genfile()
my $fh = $cfg->genfile($file);
genfile() creates a new file $file for writing and returns a file handle.
A comment with a warning and calls trace is added to the top of this file. See genwarning() for more info about this comment.
If parent directories of $file don't exist they will be automagically created.
The file $file and any created parent directories (if found empty) will be automatically removed on cleanup.
writefile()
$cfg->writefile($file, $content, [$nowarning]);
writefile() creates a new file $file with the content of $content.
A comment with a warning and calls trace is added to the top of this file unless $nowarnings is passed and set to a true value. See
genwarning() for more info about this comment.
If parent directories of $file don't exist they will be automagically created.
The file $file and any created parent directories (if found empty) will be automatically removed on cleanup.
write_perlscript()
$cfg->write_perlscript($filename, @lines);
Similar to writefile() but creates an executable Perl script with correctly set shebang line.
gendir()
$cfg->gendir($dir);
gendir() creates a new directory $dir.
If parent directories of $dir don't exist they will be automagically created.
The directory $dir and any created parent directories will be automatically removed on cleanup if found empty.
AUTHOR SEE ALSO perl(1), Apache::Test(3)perl v5.8.0 2002-09-10 Apache::TestConfig(3)