Search Results

Search: Posts Made By: harish612
53,835
Posted By harish612
Try with below i=0; if [ $i -eq 0 ]; then ...
Try with below

i=0;
if [ $i -eq 0 ]; then
echo inside if
fi


In case you want to debug your script put below code at the very beginning


set -x


Cheers
Harish
6,755
Posted By harish612
try with below code list=`ls *.sh` echo...
try with below code

list=`ls *.sh`
echo $list | tr -s '\040' '\012'


Cheers
Harish
2,832
Posted By harish612
Amit, You can also try with below code But...
Amit,
You can also try with below code
But this will search the 3rdjuly.txt for each line of the 4thjuly.txt

For eg :
Even if the 4thjuly.txt line 2 and 3rdjuly.txt line 2 are not same but...
2,832
Posted By harish612
Amit, Please check below.I have take the input...
Amit,
Please check below.I have take the input 3rdjuly.txt and 4thjuly.txt
as per the your very first post
The results are same as you are expecting

Input:

cat 3rdjuly.txt...
6,504
Posted By harish612
Run below script using <scriptname> ...
Run below script using

<scriptname> <filename>



filename=$1
filetimestamp=`ls -lrt $filename| awk '{print $7}'`
current_date=`date +%d`
a=`expr $current_date - $filetimestamp`
if [...
2,533
Posted By harish612
Try below code .. rm -f present.txt...
Try below code ..
rm -f present.txt notpresent.txt
while read line
do
line1=`grep -ie "${line}" otherfile.txt `
if [ $? -eq 0 ] ; then
echo "$line" >> present.txt
else
echo...
Showing results 1 to 6 of 6

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