![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compare two dates using Shell Programming | dave_nithis | Shell Programming and Scripting | 4 | 01-04-2008 05:18 AM |
| compare dates... | i_priyank | Shell Programming and Scripting | 3 | 09-21-2007 12:50 AM |
| compare dates | ragha81 | Shell Programming and Scripting | 2 | 11-01-2006 06:17 PM |
| How to compare dates in C/C++ | naan | High Level Programming | 1 | 08-28-2006 10:03 AM |
| How to compare two dates | bankpro | High Level Programming | 5 | 01-24-2006 04:07 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
u can use find (-mtime/-atime/-ctime) feature
U can use find command .
it has various options -mtime 3 --to find files modified exactly 3days ago -mtime +3 --to find files modified more than 3days -mtime -3 --to find files modified within 3days similarly u have -atime,-ctime and -newer etc |
|
||||
|
How to get command line parameter to be used in script
Thank u its help full.
Actually what i want to trying to do is getting some parameters as command line arguments while running a shell script and use it. Then with this i need to delete files from a directory if its exceeding the count 7. The above command will delete wat ever the specified date interval. Its also in away good but i need exactly 7 files in the directory even if i don't generate one file for a day. Now i need how to get command line parameters to be used int he script Thanks again Last edited by vaji; 02-26-2007 at 06:55 AM.. |
|
||||
|
Code:
scpt ########### echo $1 # Gives the first argument echo $2 # Gives the second argument echo $3 # Gives the third argument ########### Code:
script arg1 arg2 arg3 Code:
echo ${10}
echo ${11}
Code:
scpt "hi buddy" arg2 arg3 |
|
||||
|
Hi dears
its helpful Thank you |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| mtime |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|