PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

My first Bash script : trouble with * 3355


Your Ad Here

Your Ad Here

On Wed, 13 Apr 2005 20:26:53 +0200, Vincent Schmid staggered into the Black Sun and said:

NTP daemon not synchronizing
I seem to be unable to get ntp to work with Slackware 10.1, and I just want to find out if anybody has...

You can do this without a problem. bash expands glob patterns, though.

Escape the * . "echo*" will echo a single * to the screen. Or single-quote the *, like "echo '*' ". You've probably seen people escaping * before, as in

find . -name*stuff-* -print

...escaping the * here prevents the shell from expanding *stuff* to files in the current directory that match regexp .*stuff.* ; the *stuff* is pbutted directly to find and it finds all files in the current directory and all subdirectories that have "stuff" in their names.

The R=`lspath-to-place wc -l` that I used will be inefficient ifpath-to-place has a lot of files in it. Commands in `` are also less efficient than other ways to do things, but `` is easy to understand and very handy.

Nope. Rotating backups like this should be fairly easy.

# fragment of backup thingy BACK=-path-to-my-backups-somename cd $PATHWHEREMYSTUFFIS cp -a $DIRIWANTTOBACKUP $BACK`date +%F` # we should check $? and bail if cp returned an error. This is left as # an exercise. NUM=`ls -d $BACK????-??-?? wc -l` KILL=`ls -d $BACK????-??-?? sort -n head -n 1` rm -rf $KILL # kill the oldest one fi # end fragment

...I just rsync ~-Mailand ~-workon my laptop to my desktop every night. I don't want or need to keep 10 days worth of backups though.

Teaching Mathematics
Sorry the "crazy" crossposting. I hope the reason for this will be apparent further below in...

If you want complicated, long scripts, look at the configure scripts that ship with source tarballs. Sometimes, you'll get 7000+ lines of 40 lines, bash. If it needs more than that or needs hashes or subroutines or lots of text manipulation, Perl." YMMV.

I am not a bash guru; I just know enough to get by. HTH anyway,

-- Matt GThere is no Darkness in Eternity-But only Light too dim for us to see Brainbench MVP for Linux Admin mail: TRAP + SPAN don't belong

Alsamixer
I'm running sarge-debian and have no special applications installed. Only skype but I do not think that it messes with the sound settings. I can't see any...



Your Ad Here

List | Previous | Next

Alsamixer

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

My first Bash script : trouble with * 3354