10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi, I need the first & last day of a month from any given date. For better understanding, if i need to back-fill data for date 07/20/2019 i.e July 20 2019, i need the first & last day has 07/01/2019 - 07/31/2019. FYI: I'm using GIT BASH terminal.
sample code:
export DT=$(date --date='6 days... (2 Replies)
Discussion started by: Rocky975583
2 Replies
2. UNIX for Dummies Questions & Answers
i want to save current day file daily
for this is am using below command.
cp -p $(ls -lrt | grep "Apr 15" | awk '{print $9}'
in order to script this part, i am saving date output in a file using below command
date | awk '{print $2,$3}' >>t1
thru below command i want to list the file of... (7 Replies)
Discussion started by: scriptor
7 Replies
3. UNIX for Dummies Questions & Answers
I am using KSH.
d=date | nawk '{ print $2,$3-1}'
ls -lrt SystemOut* | nawk '/d/{print $NF}'
I am trying to list the files of previous day but it doesn't seem to be working and i am also not getting an error.
result is blank.Need help. (11 Replies)
Discussion started by: vagar11
11 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I have to work on a korn shell script to pick up only the current day files dropped on the remote server (using ftp).
The file do not have daytimestamp on it. It has to be based on server time (AIX)
The file naming convention is "test_file.txt"
When I log in into the ftp account... (15 Replies)
Discussion started by: pavan_test
15 Replies
5. Shell Programming and Scripting
Hi All,
can anyone pls share the command to list the files of current day only. i want to check if there are any files in a particular directory which are not of current date. (6 Replies)
Discussion started by: josephroyal
6 Replies
6. Shell Programming and Scripting
Hi,
I would like to write a script that checks if a file ('counter') was modified the previous day, if so erase its contents and write 00000000 into it.
For e.g. if the file 'counter' was last modified at 11.30pm on 24th May and the script runs at 12.15am of 25th May, it should erase it's... (1 Reply)
Discussion started by: hegdepras
1 Replies
7. Shell Programming and Scripting
Hi All,
I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this.
My Requirment is as below:
Input for me will be 2000909(YYYYMM)
I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Discussion started by: girish.raos
3 Replies
8. UNIX for Dummies Questions & Answers
hi all.
Please help me with archiving previous day syslog files.
the files have no extension and have the format YYYY-MM-DD.
I want to archive the file then move it to some other machine.
thanks. (2 Replies)
Discussion started by: coolatt
2 Replies
9. Shell Programming and Scripting
Hi All,
I have a scenario where I need to download the previous day modified files from other server to my server through FTP . Could any one please send me the shell script for the same.
I used the following but I dont know how to proceed after this.
ftp -n -i -v $IP <<ENDOFinPUT >>... (3 Replies)
Discussion started by: sarathchandrach
3 Replies
10. Shell Programming and Scripting
i want to delete files that are one day old
condition is files should be of current month only ie if iam running script on 1 march it should not delete files of 28 feb(29 if leap year :-)}
any modifications to
find $DIR -type f -atime +1 -exec rm -f{}\; (4 Replies)
Discussion started by: maverick
4 Replies