Software :: Get The Last Sunday Of March And October In Shell Script?
Mar 18, 2011ssist me to run the cron job only on last Sunday of March and last Sunday of October
View 11 Repliesssist me to run the cron job only on last Sunday of March and last Sunday of October
View 11 Repliesi worked on my notebook as usually. The only thing i did with the system was the update. The little screen appeared and I clicked to update everything. After the logoff/logon everything worked fine. But the next morning (yesterday) the system loaded and finished with the blinking cursor on the black screen. the yum.log output is the following (from 4th Oct):
[code]...
i did the system update but it haven`t fixed it.
I'm sure this has been covered somewhere before, but I couldn't find anything and so figured I would post here. I have been using Linux OSes for the past couple of years and also using GCC/G++ for application development. However, I have almost always been on x86 systems and never gained much experience using the wide range of optimization options available.
My question is, if I do not specify the -march=PROCTYPE option, will GCC still be able to detect the current architecture and build the code accordingly? I primarily ask this because I am working with an x86_64 system, and specifying -march=x86_64 in my makefiles generates errors about it being an unknown processor type, even though the CPU and OS are X86_64. I know this sounds like a newbie question, but it's just ground I've never had to cover before until now.
I just tried to build Digikam 1.2.0 using the SlackBuild script from SlackBuilds.org for version 1.0.0. While Lensfun 0.2.5 and Kipi-Plugins 1.2.0 compiled and installed without problems, the Digikam build stops at 97%. Here's the log:
[Code]...
All I want to do is set the machine to run a certain command (or a few) at 8 o'clock on a Sunday evening. The manual is no help, google (google keeps telling me how to do it with different cron demins rather than at) is no help, I'm at my wits' end.
Surely somebody somewhere on earth has needed to do this before??
I'm still kinda noob in linux and I've installed Debian Squeeze (LXDE version) and it boots itself (the whole computer) at midnight from saterday to sunday. This is somewhat troubling me as I'm trying to sleep at that time. I've googled about this but I couldnt find very helpful information.
View 3 Replies View RelatedSuse 11.3/Gnome 2.30.0
Evolution 2.30.1.2
I cannot get the monthly view to start the week on Sunday. The settings seem right but they don't stick. Restarting Evolution always defaults to a week start on Monday even though the defaults display Sunday. I've viewed the default settings the following two ways:
Within Evolution... Edit > Preferences > Calendar and Tasks > week starts on "Sunday"
GNOME Configuration editor.../apps/evolution/calendar/display/week_start_day = 0 (Sunday)
I'm using Centos 5.3 with xen to virtualize some virtual machines (mostly windows 2003).
It works perfectly fine excepted one thing :
Each monday morning, the server is crashed with nothing noticeable in the logs that help.
Since it allways happen between sunday 22h00 and monday 05h00, I suspect a crash when running some cron tasks...
The server works fine. I look at cron.weekly and deactivated makewhatis.com which is the only task apart 0anacron...
But it makes no difference.
I really don't see what can cause such a regular failure... As I am more specialist on Debian, there may be some specific tasks running every week on centos I didn't noticed.
MACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.
View 2 Replies View RelatedI want to change my default shell to tcsh. I used
Code:
usermod -s /bin/tcsh username
command as given at url
But if I open a new shell, it is still a bash shell.
How do I make my default shell as tcsh?
I am using ubuntu10.04-server 64bit AMD with fluxbox. After I ran Matlab in a shell (without GUI) the shell does not display characters anymore, but will execute any command, I just can't see the characters that I'm typing.. I use aterm and xterm, does anybody know why that is, am I missing a package?
View 1 Replies View RelatedIs there any way I can switch my desktop shell from unity to, say, gnome-shell? I can switch using other console shell I like (bash, csh, fish, etc.). Assume that there is a stable alternative desktop shell, I should be able to choose, too.
(For console shell, we goes to /etc/passwd. But for desktop, I can't find the way to config.)
Is there a way to export a variable to parent shell in shell scripting ?
View 3 Replies View RelatedI am trying to create a shell script similar to ls, but which only lists directories. I have the first half working (no argument version), but trying to make it accept an argument, I am failing. My logic is sound I think, but I'm missing something on the syntax.
Code:
if [ $# -eq 0 ] ; then
d=`pwd`
for i in * ; do
if test -d $d/$i ; then
echo "$i:"
code....
I would like know when it is necessary or advisable to write a shell script instead of shell function ?
View 3 Replies View RelatedIs there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?
Example:
Code:
>>> import subprocess
>>> help(subprocess)
...
[pages of stuff to read]
...
I'm hoping so as I hate scrolling and love how less works with simple keystrokes for page-up/page-down/searching etc.
I am wondering if I can open a shell or new terminal thing from within the terminal in a unix/linux enviroment. Particularly a commandline only one where there is no GUI. Is this doable? how do I do it?
View 3 Replies View RelatedI've created a simple script based menu. This menu will be accessed by only a certain users via ssh.When user logs in, the menu will automatically run. (configured at user's .bash_profile).How do I force the session to close when user hits Ctrl-C or Ctrl-Break ?In a nutshell, I don't want user to have access to shell.
View 11 Replies View RelatedQuote:
/usr/local/bin/mencoder /root/video1.avi -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=300:acodec=libfaac:abitrate=64 -srate 22050 -oac lavc -vf scale=360:240 -o /root/output_temp_video1.flv
[code]....
I have a situation where I am in a non-interactive shell. I have tried from within my non-interative shell to spawn an interactive shell but my output still does not goto me. Isn't there a way I can somehow go into /proc or somwhere and make the output my /dev/tty1? Or some way else to remedy this?The situation arises because I drop from my restricted shell environment (a sort of CLI interface), into the actual Linux shell. I cannot change the code of the CLI environment I am just faced with being in the linux shell environment and its non-interactive. Its very annoying to have to put > /dev/tty1 after every command I type.
Not to mention it seems damn near impossible to get pagers like more and less to work properly when your in a non-interactive shell.
there is a txt file :
["date"]1
["asset"]2
["cash"]3
["finance"]4
[code]....
what i want to get is :
["date"]0
["asset"]1
["cash"]2
["finance"]3
[code]....
how to get it with shell?
I wrote a script a while back that is supposed to be run in bash. It includes a hashpling (#!/bin/bash). Some people who are using the script are having problems with it however because they are forcing it to run in sh. They are doing things like:
Code:
sh script.sh
and
Code:
cat script.sh | sh
which ignores the hashpling and runs the script in sh, making the script fail half way through. How do I make my script determine the shell it's being run in and stop running if it's in /bin/sh?
PS: No, it's not
Code:
echo $SHELL
which has nothing to do with the shell you are currently in. No it's not
Code:
echo $0
which can be used in an interactive shell but does not work the same way in a script. No it's not
Code:
ps -p $$
as this will not work inside of a script the same way as it does in an interactive shell either. Those are the 3 methods that people keep describing when searching for the answer on google, and none of those works for what I need.
The panel plugin from xfce4-mixer has a bug:s icon doesn't update as the volume is changed. This bug has already been reported.One curious thing about it is that, if you right click on the volume icon on the panel, go to 'Settings' (or 'Properties', I don't know, mine is in Portuguese) and then close the window that pops on the screen, the icon is updated.Is it possible to open and close the settings window automatically with a bash script? Like this, I could associate this script with the volume keys of my keyboard, so that the icon is updated as the the volume is changed.
View 2 Replies View RelatedI have a Network Time server provided by my Smoothwall firewall and I can get all the computers on my Lan barring my F11 one, to sync with it.Using SSH I can connect into the F11 PC, what command do I need to run to force it to update?
View 4 Replies View RelatedopenSUSE 11.3 KDE 4.4.4 I am having the same problem as here Basically I can't run shell scripts from the file manager. There is no specialized application for files of the type shell script (application/x-shellscript). The file can be opened in a more generic application as file type plain text document (text/plain), or you can try to install a specialized application for file type shell script (application/x-shellscript). Do you want to try to install a specialized application? As you can see from this command line output, the file is executable.
Code:
myuser@linux-h87v:/media/data/myuser/apps/jetbrains/idea-IU-98.402/bin> ls -l idea.sh
-rwxr-xr-x 1 myuser users 3395 2010-11-19 17:34 idea.sh
I thought that since all shell scripts are showing the same behaviour that openSUSE isn't configuring itself correctly on installation. And strangely, I didn't have this problem last month when I was running openSUSE 11.3 KDE 4.5.2. The file is in my data partition so wasn't wiped out when I reinstalled. I created the same username when I reinstalled so it should still be owned by myuser. I chown'd the file as well just for good measure but I still can't get it to run. This then led me to run the script again but from the command line and I got a permission denied error. I created a new file in my home directory and this was runnable from the command line and from Dolphin but it appears to have the same permission settings I did notice on first login after installation an error about not being able to save bookmarks or something, the rest of the error being: Permission denied. This error message will only be shown once. The cause of the error needs to be fixed as quickly as possible, which is most likely a full hard drive.if it is a strange access permission thing then the error message shown by Dolphin is misleading/incorrect.
If some one can tell me how to get Gnome 3 shell to try it out.I have the 11.4 Suzy gnome edition from Live CD. I tried to find Gnome 3 in the Install/remove software, after reloading it, but it i snot there.
View 3 Replies View RelatedI am using Red Hat Linux Enterprise version 5. I've noticed people sometimes running commands with a couple of & options. For example, in the below command, there are two & signs. What is the purpose of them? Are they always used together with nohup?
nohup foo.sh <script parameters> >& <log_file_name> &
I was working on a shell and got some weird exceptions in my program.Just as a reference, I want to save all that is there on my shell to a text file. I do not just want the command history but also all the results that those commands produced at the shell.Is there some built-in utility to do this? I have kept the shell open for now, so that I can take the backup. Also, I am using xterm and it does not allow selecting all the way upto the top of the shell, so the ultimate way is to take the backup one screen at a time.
View 2 Replies View RelatedI was wondering if it is somehow technologically possible for Windows to add some sort of Linux interface? I think it would win over many programmers to develop on Windows.
View 4 Replies View RelatedI have recently put together an install script to make my life a little easier.
The server is using lighttpd and I wish for the auth mod to be enabled.
For the line:
I require the script to call the servers external IP and insert it in place of 127.0.0.1