General :: Can't Seem To Figure Out \ Script A Simple Closed Loop?

Jul 19, 2011

I think I can do it by brute force with a crontab entry for each of the 15 days at a time, but I'm not even sure I know how to do that.I'm trying to automate a process I do manually every day. That is, I execute the same command every day for 15 days running, manually changing the filename of the file by 1 each time, i.e. file.1.dmp, file.2.dmpThen after I reach the end of 15 days, I start again changing the filename being written back to the name of the first file I created 15 days ago. This overwrites the 15 files one a day for 15 days. That is, after I create the file.15.dmp, I (manually) change the name of the file being created back to file.1.dmp again.

I realize that this may not be descriptive enough to help me with getting an answer. I don't know how else to explain it. I'd be more than glad to fill in any details I've missed.I've thought about using a for loop, but it's been so long since I've had to do any programming I hesitate to go down that path. I've though about using the current date variable to change the filename, but how do I reset the script to start again after 15 days?The point of my exercise is to have a rolling backup/dump file for 15 days that I can restore from if needed.

View 7 Replies


ADVERTISEMENT

Ubuntu Multimedia :: Simple Media Player That Can Loop/repeat A Given Section Of A Song

Aug 16, 2010

I'm looking for a simple media player that can loop/repeat a given section of a song; say from 2:55 to 3:20 if I wanted. This would be useful for guitar practice.

View 8 Replies View Related

General :: For Loop Or While Loop To Read The Fields Of A File?

Sep 1, 2010

I have a mytext file with month and year as two separate fields. likemytext fil

08 2010
09 2010
10 2010
........
........
........

I want to read the values of each field i.e., month and year into an awk script.

View 10 Replies View Related

General :: Figure Out How To Write An Awk Script

Jul 5, 2011

I am trying to figure out how to write an awk script(or something better if it exists) to read a text file that contains lines like below.

4517-s-1295546289-10:58:09-2011-01-20.wav | 19990 KiB | 2940.5 KiB/s | binary | 100%
4517-s-1303247233-15:07:13-2011-04-19.wav | 167 KiB | 2918.3 KiB/s | binary | 100%
4517-s-1301431748-14:49:08-2011-03-29.wav | 36220 KiB | 2589.3 KiB/s | binary | 100%
4517-s-1295974735-09:58:55-2011-01-25.wav | 20038 KiB | 2646.0 KiB/s | binary | 100%
4517-s-1295648478-15:21:18-2011-01-21.wav | 45561 KiB | 2154.1 KiB/s | binary | 100%
4517-s-1300384178-11:49:38-2011-03-17.wav | 6752 KiB | 2216.0 KiB/s | binary | 100%

I want to find lines that start with 4517-s and end with 100% and delete them from a directory.

View 14 Replies View Related

General :: Figure Out Which Sound Card?

Mar 1, 2011

i have an old system. I am total layman in reading motherboards and chipsets. is there anyway in any linux distro, which can tell me what kind of sound card i have so i can search and install it ? Basically i am concerned about finding what sound card i have in my system

View 4 Replies View Related

General :: Cant Figure Out What This Symbol Is And How To Type It (')

Feb 24, 2011

Very simple question but I cant proceed without thWhat is this symbol 'and how do I type it? I tried google but dont really know to search for it.I'm trying to type in:Quote:

cat > ~/.bash_profile << "EOF"
exec env -i HOME=$HOME TERM=$TERM PS1='u:w$ ' /bin/bash
EOF

View 6 Replies View Related

Programming :: How To Compile / Simple Tutorial For Making Simple Program

Oct 7, 2010

i'm a college student studying pc programing, and i was given today a special work and i have to program using miranda... which i've never used it >.< can anyone give me a hand to where to download, how to compile, and a simple tutorial for making a simple program or something?

View 3 Replies View Related

General :: Figure Out Wine And Iso Mounting For Like 3 Days

Mar 6, 2010

i have been trying to figure out wine and iso mounting for like 3 days i need a step by step guide on how to do this the things i need to mount are in /home/patches/downloads/diablo 2 full game with expansion and thats the folder in which the iso files are in and first i need to mount "diablo 2 install disk.iso" and im using linux helena or thats what it's called on the boot menu

View 7 Replies View Related

General :: Folder Deleted - How To Figure Out Which User Did That

Feb 4, 2011

Somebody deleted a folder from /opt, now how I to know who did it? should I login to every user from root and check the history? or there is better and easy solution?

View 11 Replies View Related

General :: Figure Out How To Properly Remove The Program

Mar 12, 2010

I just downloaded a new app(vrs call logging) which doesn't work very well. I'm just trying to figure out how to properly remove the program. I've drilled down to the "uninstall.sh" but it will not run the uninstall program.

View 6 Replies View Related

General :: Figure Out A LAMP Setup That Will Require As Little Maintenance As Possible?

Jan 3, 2011

I�m kind of newbie trying to figure out a LAMP setup that will require as little maintenance as possible, and still be reasonable secure and maintained.After lots of googeling i think CentOs 5.x looks nice, the only problem is that i need PHP5.2.13 or later.If i add it from some 3 rd party repository it looks easy to install but what happens when there is security patches needed etc?I don�t like the idea of compiling it myself, I would probably get it running but there is always lots of do and donts that im unaware about to get it �right� not only �running�.

View 1 Replies View Related

General :: Open And Run Pivot Stick Figure Animator?

Dec 14, 2010

open and run pivot stick figure animator?

View 1 Replies View Related

General :: Need Command To Figure Out System A File Was Created On

Jan 31, 2010

I am just starting out in LINUX and I know the basic commands but I am a having a problem. I scoped the man pages but I can't get it. Maybe one of know... Can anyone tell me the cmd to figure out the system a file was created on? I just can't figure out this problem.

View 6 Replies View Related

General :: Install Imageos On Old Laptop Buti Cannot Figure Out The Password?

Mar 12, 2011

i am trying to install imageos on my old laptop buti can not figure out the password. i have tried a ton of them,

View 1 Replies View Related

General :: Run Xscreensaver Whenever The Lid Is Closed

Apr 24, 2011

How can I run xscreensaver whenever the lid is closed? I'm running Ubuntu 10.10 with the awesome window manager.

View 1 Replies View Related

General :: Connection Closed After Some Time?

Jul 27, 2010

I am facing problem while connection to host (Red Hat Enterprise Linux ES release 4 (Nahant Update 5)) via putty.

when ever i try to connect host machine via putty/ssh, connection is established succussfully but just after few minutes it disconnectes . same is the problem if i connect using VNC. I did't made any configuration changes in recent past, earlier every thing was fine.

View 3 Replies View Related

General :: DMA Open Or Closed For Better Media?

Jan 10, 2011

recently my windows XP pro crashed and so i reformatted wth fedora. when on windows i had some movies that played fine, like .aac or .mkv with no lag or bad pic. so now on fedora, with the same hardware ill use VLC or K media and its terrible. voices are off, grainy, stops a lot. i installed easylife to get the necessary plugins but still looks like garbage.so i was told to try and open my DMA to get a better experience.

View 4 Replies View Related

General :: Hot To Terminate Vnc Server When Vncviewer Is Closed?

May 9, 2011

I'm using tigthvnc server on linux machine. Often my clients are closing their vncviewrs from close button ('X'), and not exiting gracefully their sessions from OS. How can I terminate the server when they do that?

View 1 Replies View Related

General :: Retain Server On When Putty Is Closed

Jun 11, 2011

I have a server program in ubuntu which i run using putty remotely. My problem is that when i closes my putty window, my server automatically closes and stop working.
I want that once i start my server it remains on when i closed my putty window.

View 14 Replies View Related

General :: TCP Port Shows As Closed / But No Firewall

Feb 18, 2010

nmap is showing a port as closed. I have the firewall stopped on both hosts.It shows as closed on localhost as well.The process that's listening to that port is not started from xinetd so i doubt hosts.allow/deny is the issue.I can't help but feel that I'm forgetting some other access control mechanism.Both hosts are RHEl5.4

View 3 Replies View Related

General :: SSH: Server Unexpected Closed Network Connection

Jul 4, 2011

In my case, it occurs intermittently when trying to connect using putty's command line client 'plink.exe' to a linux machine using ssh. For some testing purposes, a linux server is setup with 8K virtual ip addresses and the testing scripts will connect to these ip addresses through ssh using plink.exe. There will be concurrently 25 ssh sessions launched to the server. While it works for sometimes, it throws 'server unexpectedly closed network connection' error intermittently. If the same ip address is tried again manually, it works. While the ssh server is accepting connections, this error is thrown sometimes and unable to find out the reason from the logs. It is not that the ssh connection is completely blocked. It gives this error message while connecting to some of the virtual ip addresses but works some times.

The hosts.deny, sshd_config are tuned to allow the connections, allow more sessions etc.

View 2 Replies View Related

General :: Port Just Can't Decide Weather It's Open Or Closed

Feb 18, 2010

I am only getting 4.7kb/s, dispite there being 31 or so Seeders. The port is just opening and closing it seems, I have no idea why though.The port was opened both with firestarter (which isn't supposed to be firewalling ATM) and "sudo iptables -A INPUT -p tcp --dport 6884 -j ACCEPT".It was also opened under the 'Application Sharing' menu of my router.

View 6 Replies View Related

General :: FTP Error - 421 Service Not Available, Remote Server Has Closed Connection

Mar 23, 2011

We have one FTP server. Users are uploding files to the perticular directory remotely. but today some users got below error message.

421 Service not available, remote server has closed connection.

(vsftpd service is up and running) What are the possible causes for this error and from where I should start troubleshooting?

View 5 Replies View Related

General :: Cd Error From For Loop?

Nov 10, 2010

./test.sh: line 3: syntax error near unexpected token `cd'
./test.sh: line 3: `cd $f'
--------------------------------

[code]....

View 1 Replies View Related

General :: Syntax Error In If Loop?

Mar 7, 2011

I have a requirement to check the following conditions..If my folders are not A and B then list files in the directory else no listing the filesso my if loop is some thing like this.

Code:
if [ $dirName = "C" && $dirName != "A" && != "B" ] then
ls -la

[code]....

View 1 Replies View Related

General :: Bash For Loop Not Working?

Apr 21, 2010

I have bash 4.0. I used the following for loop example, but all it outputs is "{1..10} instead of the actual numbers one through ten. why?

Code:
for a in {1..10}
do
echo -n "$a "
done

View 5 Replies View Related

General :: Using 'find' And 'grep' In A For Loop?

Mar 23, 2011

I have a server hosting 100+ websites. I need to quickly identify which websites are configured with a database. There are way too many to manually check every website for a PHP file with a database name. So, I created a list of all databases from MySQL and put them in a text file. I then exported the text file to a shell variable and used it in a for loop.

bash variable

Code:
DBLIST=`cat dblist.txt`
Example of $DBLIST

Code:
db1 db_testing2 database_clientname production words4cheap
for loop

Code:
for db in $DBLIST; do find . -type "f" -iname "*.php" -exec grep -i $db '{}' ; -print; done
Note: my find statement starts searching at . which is the directory that contains all of my websites and their data, each website is setup in a sub directory, identified by it's domain name.

Example: I'm in /var/www. Beneath /var/www are a list of directories:

[URL]

However, this is taking too long (it's been running most of the day) and I was wondering if there wasn't an easier way to accomplish what I'm trying to achieve?

View 4 Replies View Related

General :: Cannot Add Fractions In Loop Using Bc In A Script?

Feb 11, 2010

i have tried a lot to add floating values in while loop using bc, but no sucess!!!

script is :
read a1
read a11

[code]....

View 5 Replies View Related

General :: Shell Programming Using While Loop

Jun 28, 2010

I am trying to do some shell programs. I tried some sites regarding the while loop, they give the structure as:
Code:
while [ n1 -lt 500 ]
do
echo $((n1+100))
done

But the below code also worked for me:
Code:
while ((n1 > 500))
do
echo $((n1+100))
done
By using (( )) I could use while, for. But the documentations didnt follow this way. I mainly use this for datastructure programming.

View 4 Replies View Related

General :: Loop Detected When Resolving The Name From Dns?

Apr 26, 2010

The problem of loop detected when resolving the name from dns.Why the problem of loop detected comes when name is resolving from dns.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved