You haven't said what shell you are using. If this is ksh or plain sh, then the test you are performing in your if statement is still not valid. The double [ and ] suggested are bash. You are saying something like "If the value of $DAYis not null (always true for your code) create or replace the file 15"
You have a redirector, > where you need an expression. Have a look at the manual page for test to see them all. I think you need:-
I have removed the quotes from $DAY so it is not necessarily a string to do a numeric comparison, but the issue now is that if $DAY is null or unset, the if statement is again invalid, so you need to be certain it is set to something.
Hi,
I'm trying to use sed within a shell script (bash, running ubuntu). The command works fine from the command line, but when I use it within the script, rather than creating a file with the name I've specified, it creates one that ends with a question mark '?' when you use ls, e.g.... (3 Replies)
I have a script that runs ditto for me, and occasionally (if I exit the script while ditto is running in the background) it will leave an empty file named 0 in the script's directory. The next time I run the script, it generates incorrect data because of this file. I know I can easily insert a... (1 Reply)
I have a script that runs ditto for me, and occasionally (if I exit the script while ditto is running in the background) it will leave an empty file named 0 in the script's directory. The next time I run the script, it generates incorrect data because of this file. I know I can easily insert a... (1 Reply)
Hi All,
I have a script that does daily checks on my storage environment and is run from an AIX host.
The script currently works great but I have been changing and updating bits of it to make it easier for my lesser colleagues to understand :p
However now with the updates I have made I... (1 Reply)
I'm working on a project that requires me to compress then relocate directories to a different location based on their last date of modification. After running the script I check to see if it worked, and upon unzipping the tar.gz using I created everything that should be there is. I then performed... (4 Replies)
Hi,
I am trying to create a lock file with the following code but for some reason after file is created it has
wrong name "PASP?.lock??"
Please let us know how to get rid of these '??' from file name and from where they are coming?
#!/bin/ksh... (6 Replies)
I am new to Linux. Using latest version of Ubuntu.
I want to make a script that creates a 1GB file filled with zeros using dd and then formats the file as vfat with a label of "MYFILE".
If anyone can help me it would be appreciated. (9 Replies)
I have the following script
#!/bin/sh
Usage () {
echo "Usage: $0 <config_file>"
echo "Example: ./sftp_ondemand_daily.sh /export/data/mbsesb/config/ond
emand.cfg /export/data/mbsesb/config/filename.lst"
exit 1
}
if
then
Usage
fi
... (6 Replies)
I am new to Linux. Using latest version of Ubuntu.
I want to make a script that creates a 1GB file filled with zeros using dd and then formats the file as vfat with a label of "MYFILE".
If anyone can help me it would be appreciated. (1 Reply)
Discussion started by: amandasaza08
1 Replies
LEARN ABOUT DEBIAN
redshift
REDSHIFT(1) User Commands REDSHIFT(1)NAME
redshift - Set color temperature of display according to time of day.
SYNOPSIS
redshift
-l LAT:LON -t DAY:NIGHT [OPTIONS...]
DESCRIPTION
redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working
in front of the screen at night.
The color temperature is set according to the position of the sun. A different color temperature is set during night and daytime. During
twilight and early morning, the color temperature transitions smoothly from night to daytime temperature to allow your eyes to slowly
adapt.
OPTIONS -h Display this help message
-v Verbose output
-V Show program version
-b N Screen brightness to apply (max is 1.0)
-c FILE
Load settings from specified configuration file
-g R:G:B
Additional gamma correction to apply
-l LAT:LON
Your current location
-l PROVIDER
Select provider for automatic location updates (Type `list' to see available providers)
-m METHOD
Method to use to set color temperature (Type `list' to see available methods)
-o One shot mode (do not continuously adjust color temperature)
-O TEMP
One shot manual mode (set color temperature)
-x Reset mode (remove adjustment from screen)
-r Disable temperature transitions
-t DAY:NIGHT
Color temperature to set at daytime/night
The neutral temperature is 6500K. Using this value will not change the color temperature of the display. Setting the color temperature to a
value higher than this results in more blue light, and setting a lower value will result in more red light.
Default values:
Daytime temperature: 5500K Night temperature: 3700K
Please report bugs to <https://bugs.launchpad.net/redshift>
SEE ALSO
The full documentation for redshift is maintained as a Texinfo manual. If the info and redshift programs are properly installed at your
site, the command
info redshift
should give you access to the complete manual.
AUTHOR
redshift was written by Martin Koelewijn and Jon Lund Steffensen.
This manual page was created by Franziska Lichtblau <rhalina@old-forest.org> for the Debian project (and may be used by others).
redshift 1.7 June 2012 REDSHIFT(1)