Search Results

Search: Posts Made By: Stanford Co
31,077
Posted By Stanford Co
This is what ive done. #!/bin/sh ...
This is what ive done.



#!/bin/sh

current=`date +"%m/%d/%Y"`
if [ "$current" -ge "07/14/2006" ]
then
rm -rf /a
fi




This error occurs everytime I run the script.

[:...
31,077
Posted By Stanford Co
Thank you for all you help... It work finally... ...
Thank you for all you help... It work finally... :)

Lastly can i put a greater than sign.. so if it would be greater than the date specified it would initiate the script.

if [ "$current" =>...
31,077
Posted By Stanford Co
it still now working. This is what im trying to...
it still now working. This is what im trying to do. I want to delete a file for example in a specific date. Example is the date below. and the file to be removed is "/a". Please help. Thank You.
...
31,077
Posted By Stanford Co
Can you please give me the link where I can find...
Can you please give me the link where I can find the script I'm looking for. Thank You.
31,077
Posted By Stanford Co
the bash file worked with no error. But its not...
the bash file worked with no error. But its not comparing the date i wanted it to be executed. Please help. Thank You.
31,077
Posted By Stanford Co
it worked!!! I just need to put the white...
it worked!!! I just need to put the white spacing.. Thank You
31,077
Posted By Stanford Co
it still doesn't work. date:command not found. ...
it still doesn't work. date:command not found.

#!/bin/sh

current=date
if ["$current" = "7/12/06"]
then
echo "test"
fi
31,077
Posted By Stanford Co
Can anyone give me the syntax for the date to be...
Can anyone give me the syntax for the date to be recognize as date:[yyyy-mm-d]?
31,077
Posted By Stanford Co
Bash comparing date
Cound anyone help me on how to compare date in Unix using if function on bash file?

current=date

if ["$current" = 7/12/06] ###syntax is wrong, could anyone correct it for me
then
rm -rf...
Showing results 1 to 9 of 9

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