This requires a version of date which can do -d "day" and +%s which -- with my luck -- probably excludes yours.
You can do date arithmetics even if the date command doesn't support it - at least on the day level - quite easily using the TZ variable (i suppose in the following example that you are in the GMT timezone. You will have to introduce a corrective factor if not.):
Hi,
I have a requirement that i need to store only the filename without its extension. Can anyone please help me to do this.
For Example, i have stored the filename in a varialble called fname. I need to extract all the charecters before the first occurence of the dot.
If fname has value... (3 Replies)
Hi,
Any help on this would be very appreciated.
I capture the full path & filename in a variable like (varFile=/home/user/extfile.txt). Now in my shell script I have to use only the filename part i.e. extfile.txt. How do I extract only the filename part from the variable?
Thanks in... (3 Replies)
I need to extract the date part from the file name (20080221 in this ex) and compare it with the current date and delete it, if it is a past date.
$file = exp_ABCD4_T-2584780_upto_20080221.dmp.Z
really appreciate any help.
thanks
mkneni (4 Replies)
Hi,
I need to extract the file name without filetype.
Suppose in DIR1 if i have files like F1.txt and F2.DOC then i need to return F1 and F2 only with out file types (txt and DOC).
I tried with the following code
newname = ` $i | cut -d "'." -f1`
but it is giving the error " 0403-006... (1 Reply)
hi all,
I'm trying to automate some tasks and while I've got the script itself working, I'm having difficulties with automatic file detection and associated variable setting...
for example, in a directory I've got several files... something along the lines of:
xis0_NAME_src.file... (2 Replies)
I am using ksh93 on Solaris.
Ok, this may seem like a simple request at first. I have a directory that contains sets of files with a YYYYMMDD component to the name, along with other files of different filespecs. something like this:
20110501_1.dat
20110501_2.dat
20110501_3.dat... (2 Replies)
Hi
I would like to extract the first portion of filename from a list of files.
The filename pattern is of the form 123456789_TEXT_TEXT_TEXT_.csv. I want to extract just the numerical portion of this filename from the list of files and then output this into another text file.
K (6 Replies)
Hello,
I'd like to write a monthly archive script that archives some logs. But I'd like to do it based on yesterday's date. In other words, I'd like to schedule the script to run on the 1st day of each month, but have the archive filename include the previous month instead.
Here's what I... (5 Replies)
Suppose i have a list of files in a directory as mentioned below
1. Shankar_04152019_ny.txt
2. Gopi_shan_03122019_mi.txt
3. Siva_mourya_02242019_nd.txt
..
.
.
.
.
1000 . Jiva_surya_02282019_nd.txt
query : At one shot i want to modify the above all filenames present in one path with... (4 Replies)
I am using bash and have a filename with a path and extension and want to extract just the filename
Have used the following code, oflna gives the file name with extension, but now neet to remove the .texi at the end.
oflna=${flnm##*/}
oflnb=${${flnm##*/}%.*}
echo "flnm: $flnm"
echo... (1 Reply)
Discussion started by: Danette
1 Replies
LEARN ABOUT DEBIAN
rotter
ROTTER(1)ROTTER(1)NAME
rotter - a recording of transmission / audio logger for JACK
SYNOPSIS
rotter [options] <directory>
DESCRIPTION
Rotter is a Recording of Transmission / Audio Logger for JACK. It was designed for use by radio stations, who are legally required to keep
a recording of all their output. Rotter runs continuously, writing to a new file every hour.
Rotter can output files in two different strutures, either all files in a single directory or create a directory structure:
flat: /root_directory/YYYY-MM-DD-HH.suffix
hierarchy: /root_directory/YYYY/MM/DD/HH/archive.suffix
combo: /root_directory/YYYY/MM/DD/HH/YYYY-MM-DD-HH.suffix
dailydir: /root_directory/YYYY-MM-DD/YYYY-MM-DD-HH.suffix
The advantage of using a folder hierarchy is that you can store related files in the hour's directory.
OPTIONS -a
Automatically connect JACK ports to the first two JACK input ports found.
-f <format>
Select the output format of the log files. See the rotter help screen for a list of supported output format names.
-b <bitrate>
Select the bitrate (in kbps) of the log file. This parameter is only supported by bitstream formats (MPEG Audio).
-c <channels>
Set the number of input channels to be logged. This number of JACK ports will be created. Should either 1 or 2.
-n <name>
Choose the name of the Jack client to register as.
-N <filename>
Choose a filename prefix for the archive files created (default archive).
-d <hours>
Specifies the number of hours of audio to keep before it is deleted. Files are deleted at the start of every hour, based on the files
modification date. Default is to not delete files.
-R <secs>
Sets the length (in seconds) of the ringbuffer. This is the buffer between the internal audio grabber and the audio encoder. If you
have a slow machine you might want to try increating the size of the buffer.
-L <layout>
Choose a file layout option for the archive files created. See above for a list.
-j
By default rotter will automatically try and start jackd if it isn't running. This option disables that feature.
-v
Enable verbose mode. Display more messages about what rotter is doing.
-q
Enable quiet mode. Only display error messages.
EXAMPLES
rotter -a -f mp3 -d 1000 -b 160 -v /var/achives
Start logging audio to hourly files in /var/archives. Rotter will automatically connect itself to the first two JACK output ports it finds
and encode to MPEG Layer 3 audio at 128kbps. Each hour it will delete files older than 1000 hours (42 days). Verbose mode means it will
display more informational messages.
AUTHOR
Written by Nicholas J Humfrey
RESOURCES
Web site: http://www.aelius.com/njh/rotter/
COPYING
Copyright (C) 2006-2007 Nicholas J Humfrey. Free use of this software is granted under the terms of the GNU General Public License (GPL).
10/03/2010 ROTTER(1)