Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: rajamadhavan
593
Posted By rajamadhavan
Pls check the cron logs sent to the mail of the...
Pls check the cron logs sent to the mail of the user running the cron.

I think you cron is not able to find the path of gdate and as a result '$d' will be a null string and the subsequent mget...
816
Posted By rajamadhavan
the standard way is to use h2xs to create an...
the standard way is to use h2xs to create an installable package.
982
Posted By rajamadhavan
You can check the source of the page, send the...
You can check the source of the page, send the submit input corresponding to the button with the wget request using --post-data option.
634
Posted By rajamadhavan
perl -lne 'print $1 if /(\d+\.\d+\.\d+\.\d+)/'...
perl -lne 'print $1 if /(\d+\.\d+\.\d+\.\d+)/' /var/log/maillog
2,834
Posted By rajamadhavan
the fact that it works outside the perl script...
the fact that it works outside the perl script with apache user, I believe it should work inside the script as well. May be try pushing the STDERR to the file that you are writing and check if the...
1,835
Posted By rajamadhavan
Cant make out whats going wrong. It works on my...
Cant make out whats going wrong. It works on my system. Please double check the contents of file1.

-Raja
3,572
Posted By rajamadhavan
The best option for such requirement is Tie::File...
The best option for such requirement is Tie::File

In anyway, you need to seek to the beginning of the file before reading it again.


#! /usr/bin/perl -w

open FH, "+< testfile" or die "$@";...
9,797
Posted By rajamadhavan
You can make email.txt to contain html formatting...
You can make email.txt to contain html formatting with required colors.

refer https://www.unix.com/shell-programming-scripting/168521-sending-html-email-through-mailx.html
1,289
Posted By rajamadhavan
rm -rf * Be very very careful on what you...
rm -rf *

Be very very careful on what you are deleting. This command deletes everything under the current dir.
1,584
Posted By rajamadhavan
$ echo "breakAfterThreeChars:" | perl -ne ...
$ echo "breakAfterThreeChars:" | perl -ne 's/(\w{3,3})/\1\n/g;print'
bre
akA
fte
rTh
ree
Cha
rs:
1,281
Posted By rajamadhavan
Pls read this link ...
Pls read this link

http://www.packtpub.com/sites/default/files/downloads/Integration_with_Other_Tools.pdf
1,211
Posted By rajamadhavan
Make V to $2 on your script since your actual...
Make V to $2 on your script since your actual file has a [ in the beginning.


V = $2
1,555
Posted By rajamadhavan
Double quotes works in some cases, but not all....
Double quotes works in some cases, but not all. You can use shell env variables in perl using -MEnv option


$ export year1=2011
$ perl -MEnv -e 'print $year1'
2011
1,555
Posted By rajamadhavan
little simpler to avoid use statement perl...
little simpler to avoid use statement

perl -MDate::Calc=Delta_DHMS -e '($Dd,$Dh,$Dm,$Ds) = Delta_DHMS($year1,$month1,$day1, $hour1,$min1,$sec1, $year2,$month2,$day2, $hour2,$min2,$sec2)'
9,482
Posted By rajamadhavan
Is your need to print them at one go using a...
Is your need to print them at one go using a single sed command ?

Can't you go with something like this ?


sed '3q' filename && sed -e :a -e '$q;N;4,$D;ba' filename
9,482
Posted By rajamadhavan
Check "selective printing of certain lines"...
Check "selective printing of certain lines" section on this page

http://www.catonmat.net/blog/wp-content/uploads/2008/09/sed1line.txt
1,674
Posted By rajamadhavan
Did you try writing to a file and check instead...
Did you try writing to a file and check instead of echoing echo "$1/$i bla" ?

Does your filenames.txt look clean without any <CR> at the end of the line ?
2,151
Posted By rajamadhavan
Yes. Only root can do that.
Yes. Only root can do that.
2,151
Posted By rajamadhavan
Run updatedb... $ updatedb
Run updatedb...



$ updatedb
1,246
Posted By rajamadhavan
from what i could understand your need...check...
from what i could understand your need...check something like this works out for you


#!/bin/bash

count=0
for i in $(cat invfile)
do
count=$((count+1))
filex=$(cat /tmp/*.txt | sed -n...
2,781
Posted By rajamadhavan
I think you need to make your input file like...
I think you need to make your input file like this to work


tcp:\\/\\/localhost.com:7223|7223
tcp:\\/\\/localhost.com:7224|7224
3,048
Posted By rajamadhavan
May not be the best way, but it can do the job...
May not be the best way, but it can do the job for you..


var=$(grep "< [^- ><]" file2.txt | sed -e 's/< //g')
awk -v pat=$var '/^\/.+/{a=$0;} $0 ~ pat{print a;exit}' file1.txt
5,944
Posted By rajamadhavan
This will solve your need. This is a giveaway,...
This will solve your need. This is a giveaway, but you are expected to make an attempt to write it yourself and post to the forum when you hit any issue.


#!/usr/bin/perl -w

use strict;...
9,852
Posted By rajamadhavan
-n option to ssh will avoid this. while...
-n option to ssh will avoid this.


while read a b
do
ssh -qn $a uname -a
done < inputfile
15,132
Posted By rajamadhavan
#!/bin/ksh arrayname=(1 2 3 4 5) echo...
#!/bin/ksh
arrayname=(1 2 3 4 5)
echo ${arrayname
} | tr " " "\n"
Showing results 1 to 25 of 57

 

Featured Tech Videos

All times are GMT -4. The time now is 05:34 PM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy