Search Results

Search: Posts Made By: Makarand Dodmis
15,613
Posted By Makarand Dodmis
tryawk '{print $0}' x1 x2 x3 x4 > X
tryawk '{print $0}' x1 x2 x3 x4 > X
2,751
Posted By Makarand Dodmis
your problem solved... tryvar=$(grep somestring...
your problem solved...
tryvar=$(grep somestring somefile) && [[ ! -z "${var}" ]] && echo "${var}"|mailx -s "Found something" email@mycomp.com
Courtesy : Pilnet
4,750
Posted By Makarand Dodmis
yes...working...thanks actualy it is some other...
yes...working...thanks
actualy it is some other user's post which i was trying to solve...i will reply to him..anyways thanks
4,750
Posted By Makarand Dodmis
thanks mates for responses i want to grep word...
thanks mates for responses
i want to grep word Makarand if found i want to mail the grep output to my email....if doest not found .. do nothing...
I tried in below way but not workingnawk -v...
4,750
Posted By Makarand Dodmis
Grep output to awk command
Hi Team(Solaris 5.8/Ksh),

How can we save grep output to awk variable when grep returns more than one line or word.
abc.log
[Makarand] # more abc.log
Hi Makarand
How r u
bye Makarand
Hello...
3,512
Posted By Makarand Dodmis
Now you can use that log msg to achive your task...
Now you can use that log msg to achive your task like belowftp_log=`/usr/bin/ftp -nv $HOST <<EOF`
user $USER $PASSWD
#cd Ordens
binary
mget *HLR*
bye
EOF`
if [ `grep "No space left on device"...
3,512
Posted By Makarand Dodmis
Hi what is output of below code...
Hi what is output of below code ftp_log=`/usr/bin/ftp -nv $HOST <<EOF
user $USER $PASSWD
#cd Ordens
binary
mget *HLR*
bye
EOF`

echo $ftp_log
3,512
Posted By Makarand Dodmis
check what is exit status of ftp command using...
check what is exit status of ftp command using echo $?....
then using if condition send the mail to user..something like belowif [ $? -eq <o/p of above echo> ] # exit status is not 0
then
...
4,543
Posted By Makarand Dodmis
then like this .. will it?awk '{print > $3".txt";...
then like this .. will it?awk '{print > $3".txt"; close($3".txt")}' file
2,751
Posted By Makarand Dodmis
tryif [ `grep somestring somefile | wc -l` -gt 0...
tryif [ `grep somestring somefile | wc -l` -gt 0 ];
then
grep somestring somefile | mailx -s "Found something" email@mycomp.com
fi
4,543
Posted By Makarand Dodmis
tryawk '{print > $3".txt"}' filename
tryawk '{print > $3".txt"}' filename
2,751
Posted By Makarand Dodmis
then what you want to send in case grep dosent...
then what you want to send in case grep dosent find anything??
2,751
Posted By Makarand Dodmis
trygrep somestring somefile | mailx -s "Found...
trygrep somestring somefile | mailx -s "Found something" email@mycomp.com (makarand.dodmise@lloydsbanking.com)
2,588
Posted By Makarand Dodmis
try If you want files onlyfind $PWD -type f ...
try
If you want files onlyfind $PWD -type f
If you want files and directoriesfind $PWD
If you want directories onlyfind $PWD -type d
1,962
Posted By Makarand Dodmis
tryfileexist=0 ls -d...
tryfileexist=0
ls -d "$LANDINGDIR"/"$LINKTRIGGER."* |\
while read file ; do
if [ -f "$file" ] ; then
fileexist=1
fi
done
if [ $fileexist -eq 1 ] ; then
log_err "At...
4,044
Posted By Makarand Dodmis
1) is upload.xxx@example.com...
1) is upload.xxx@example.com (upload.xxx@example.com) exists?
2) is mail installed on your linux/unix box?
what is output of below commandwhich mail
4,044
Posted By Makarand Dodmis
tryecho "Mail Body" | mailx -s "Hello Friends"...
tryecho "Mail Body" | mailx -s "Hello Friends" upload.xxx@example.com
Or if you want to send file contents as mail bodymailx -s "Hello Friends" upload.xxx@example.com < file.log
3,127
Posted By Makarand Dodmis
Buddy try[Makarand] # nawk -v var=`pwd` '{ if...
Buddy
try[Makarand] # nawk -v var=`pwd` '{ if ($0 ~ /^case_OM/) gsub($2,var,$0); { print $0 }}' FS="'" linux
hello
case_OM = PV4Reader( FileName='/hww/appl/test/testv/bin/mak_test' )
sdsdsd s1
...
3,127
Posted By Makarand Dodmis
Hi Linux_user trynawk '{ if ($0 ~ /^case_OM/)...
Hi Linux_user
trynawk '{ if ($0 ~ /^case_OM/) gsub("s1","s2",$0); { print $0 }}' filename
output[Makarand] # more linux
hello
case_OM = PV4Reader(...
3,728
Posted By Makarand Dodmis
try#!bin/bash # start the process from...
try#!bin/bash

# start the process from absolute path
. /u01/app/oracle/opmnctl startall
Forum: Programming 09-17-2014
1,067
Posted By Makarand Dodmis
It is Unix forum..However you can use below code ...
It is Unix forum..However you can use below code
update t1533 ee set ee.c7 = 6000 where ee.c1 in
(SELECT
e.c1
FROM
t2068 c INNER JOIN t1533 e ON e.c1000000829 = c.c301572100
where ...
Forum: Solaris 09-16-2014
1,368
Posted By Makarand Dodmis
have you tried0,5,10,15,20,25,30,35,40,45,50,55 *...
have you tried0,5,10,15,20,25,30,35,40,45,50,55 * * * * /internaldisk1/Task*logs1
PS: I havent tested it....
3,727
Posted By Makarand Dodmis
./test.sh -param1 -param2 note that the 2nd...
./test.sh -param1 -param2
note that the 2nd script is called using a dot (./)
this dot notation runs the second script in the same shell ..i.e calling shell ..
if u call it without using a dot...
16,891
Posted By Makarand Dodmis
Hi Shiv i am assuming you are running below...
Hi Shiv

i am assuming you are running below code today.
So it will list 10 days older files but not 253 days older.
243 means 01 jan 14 to 31 Aug 14. and 1 sep to 10 sep (10 days)
The files...
3,600
Posted By Makarand Dodmis
Tryval=`sqlplus -s <<ESQL ${DB_LOGON} set...
Tryval=`sqlplus -s <<ESQL
${DB_LOGON}
set serveroutput off
set heading off
set feedback off
set verify off
set define off
select col_name from table;
exit
ESQL`

while true; do
...
Showing results 1 to 25 of 227

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