[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] help
From: |
Val Krem |
Subject: |
[Help-bash] help |
Date: |
Sun, 6 Mar 2016 15:22:37 +0000 (UTC) |
Hi all,
I am using this more often in several places.
find . -type f -mtime +10 -name "*.txt"
So I want to put it in my .bashsrc as (util.sh)
#!/bin/bash
find . -type f -mtime +10 -name "*.txt"
So when I call this script (util.sh) anywhere
I want to have three agreements ($1, $2 and $3).
$1 takes the time ( +10 or +150 or +200)
$2 should take the file name ( "*.txt", "*.csv", etc)
$3 an action such as (the default should list, if there is an argument such as
head or tail or even -delete the delete those files )
Any help how to do this?
- [Help-bash] help,
Val Krem <=