I want to create a script that will zip the previous log.
Hi All,
Request your expertise in tackling one requirement in my project,(i dont have much expertise in Shell Scripting). The requirement is as below,
1) We store the last run date of a process in a file. When the batch run the next time, it should read this file, get the last run date from the file.
Hi All,
I am very new to unix and just started to work with unix and shell scripting.I have a query anyone help would be much appreciated
I am using sun solaris OS
I want to validate a file according to its date and if validate successful then it would write the file name,size,date and time only in a log file
For example
suppose a file
-rw-r--r-- 1 xxxxxx xxxx 2400390 Sep 10
My first solution to this was to execute date +%Y%m%d%H%M and put that format of numbers into a file, and run the script every minute from cron. Then if the date from the file matches the date command, the script would do something. Then it would update that file for the next day plus 3 minutes.
Hi,
In short : I have several log files and I need to find the last file with a certain keyword in it.
Code:
# ls -1tr logs
log_hostX.Jan01_0100.gz
log_hostX.Jan01_0105.gz
log_hostX.Jan01_0110.gz
log_hostX.Jan01_0115.gz
log_hostX.Jan01_0120.gz
log_hostX.Jan01_0125.gz
log_hostX.Jan01_0130.gz
log_hostX
Through Internet I found a way to examine the last, the previous and the previou
Hi Expert,
Hope someone have script or can show me how to write a short script file to read file (text) contains a list of directories name and delete everything in it.
There are 10,000 directories - So there is NO WAY I can do manually. Hope some expert out there has a scripts in place. That would be greatly appreciated.
Thanks,
Hello. I need help trying to create a script in UNIX to do the following steps. I don't know which commands to input to achieve this.
1. In a directory tree, I want to duplicate all .txt files into the same directory, so 2 of each file exists in each directory where there is a .txt file
In the newly created files, I need to:
2. Change the extension to .dat
3.
Hi All,
when i ftp the file from windows machine to unix server the record count in the file is decreased by 1.
example: Say a text file has three lines in it and when you place this file in unix server from your local machine and run a below command
cat filename | wc -l
the output is showing as 2
but when you create a same file and same lines in unix machine directly it will show r
Hi all,
I need a shell script to write into a .txt file the no of files in a directory with extension and separated by comma in between.