Search Results

Search: Posts Made By: synak
4,735
Posted By synak
Just use the command: id
Just use the command: id
8,630
Posted By synak
This relies on GNU date. #!/bin/bash if [[...
This relies on GNU date.

#!/bin/bash
if [[ $(date +%u) = 1 ]]
then
echo get /usr/home/data-$(date --date="-2 days" '+%Y%m%d').xml > /usr/local/sandeep/GetFILE.ini
# some command that calls...
4,257
Posted By synak
find /home/member -type f -mtime +60 ! -name '.*'...
find /home/member -type f -mtime +60 ! -name '.*' -exec mv '{}' /backup \;

moves all files modified greater than 60 days ago, that do not begin with a period, to /backup.
1,787
Posted By synak
#!/bin/bash if [ $# -ne 1 ] then echo...
#!/bin/bash
if [ $# -ne 1 ]
then
echo "usage: `basename $0` <-l|-w>"
exit 1
fi

case "$1" in
-l)
echo lines/filename
wc -l * | sort | grep -v ` basename $0` | grep -v...
4,610
Posted By synak
#!/bin/bash if [ $# -eq "0" ] then # this...
#!/bin/bash
if [ $# -eq "0" ]
then
# this prints the usage if no arguments are received.
echo "usage: `basename $0` <user>"
exit
fi

# check if username provided to script is a valid...
Showing results 1 to 5 of 5

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