linuxcommand-discuss Mailing List for LinuxCommand (Page 3)
Brought to you by:
bshotts
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(13) |
Jul
(2) |
Aug
(1) |
Sep
(1) |
Oct
(13) |
Nov
(1) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
2002 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(29) |
Sep
(5) |
Oct
(3) |
Nov
(5) |
Dec
(3) |
2003 |
Jan
|
Feb
(2) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: William S. <wes...@co...> - 2002-08-29 02:14:43
|
On Wednesday 28 August 2002 08:36 pm, Bruce Burhans wrote: > > First, you could simplify it by doing the following: > > > > #!/bin/bash > > > > old=$1 > > new=$2 > > > > for i in *$old; do > > k=$(basename $i $old) > > mv $i $k$new > > done > > > > I haven't tested this, but it looks right ;-) > > Bill.....I have bad news and good news..... > > The script above puts the new extension on every file > in the directory, regardless of its present extension... > The test part is needed.... Try it again Bruce. The "for" will only select files that have the old extension. Make sure you are using: for i in *$old; and not for i in * $old; If you include a space between the "*" and the "$old", it will process all the files. > > I am a good way through your scripting tutorial, and it > is the best one out of a half-dozen I have on my box.. > > You take the time to explain what is going on, to answer > obvious questions that pop up, and are oriented towards > functionality. For example: Not one of the other tutorials > mentions that you bash has a help command..... > > I've read the entire bash reference manual, and had no > idea that such a thing existed.......Nor do any of them > tell you that you put a function in your .bashrc.....! > (why don't you need to chmod +rx it ? ) or enter them > on the cli..... You don't need to make it executable because it's not executed, it's sourced. That is, it is read as input by another script, usually .bash_profile. > You have the makings of a really good book there... > (e or otherwise ) Maybe someday. I'd be happy just to have enough time to write the next lesson. -- ||||| William Shotts, Jr. (bshotts AT panix DOT com) ||||| Be a Linux Commander! Follow me to http://linuxcommand.org |
From: Alaa T. G. <al...@an...> - 2002-08-29 00:58:29
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 nice script, I modified it a bit to be handle filenames with spaces (they are not a good idea I know) #!/bin/bash old=$1 new=$2 for i in *$old; do echo mv \"$i\" \"`basename "$i" $old`$new\"; done I prefer it to print the commands on stdout first just to make sure that everything is OK and then pipe the output to bash for the actual renaming to happen. cheers, Alaa - -- Perilous to all of us are the devices of an art deeper than we ourselves possess. -- Gandalf the Grey [J.R.R. Tolkien, "Lord of the Rings"] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE9bXCQqIWBQ7ecPHcRAudiAJ9v0GMzAtqk5BqpGYcBEtU/VUh9bwCghC+M xIYgdHy/0trhSLFzqc/8zag= =aHkG -----END PGP SIGNATURE----- |
From: Bruce B. <bbu...@ea...> - 2002-08-29 00:36:27
|
----- Original Message ----- From: "William Shotts" <wes...@co...> To: <lin...@li...> Sent: Monday, August 26, 2002 6:08 PM Subject: Re: [Linuxcommand-discuss] Greetings & a Script > On Sunday 25 August 2002 01:26 pm, Bruce Burhans wrote: > > > #!/bin/bash > > # 2.05 > > old=$1 > > new=$2 > > for i in $( ls ); do > > if [[ $i != *$old ]]; then > > shift > > else > > k=$( basename $i ${old} ) > > > > mv $i ${k}${new} > > fi > > done > > First, you could simplify it by doing the following: > > #!/bin/bash > > old=$1 > new=$2 > > for i in *$old; do > k=$(basename $i $old) > mv $i $k$new > done > > I haven't tested this, but it looks right ;-) > Bill.....I have bad news and good news..... The script above puts the new extension on every file in the directory, regardless of its present extension... The test part is needed.... I am a good way through your scripting tutorial, and it is the best one out of a half-dozen I have on my box.. You take the time to explain what is going on, to answer obvious questions that pop up, and are oriented towards functionality. For example: Not one of the other tutorials mentions that you bash has a help command..... I've read the entire bash reference manual, and had no idea that such a thing existed.......Nor do any of them tell you that you put a function in your .bashrc.....! (why don't you need to chmod +rx it ? ) or enter them on the cli..... You have the makings of a really good book there... (e or otherwise ) Thanks, Bruce<+> > -- > ||||| William Shotts, Jr. (bshotts AT panix DOT com) > ||||| Be a Linux Commander! Follow me to http://linuxcommand.org > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > Linuxcommand-discuss mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxcommand-discuss |
From: Bruce B. <bbu...@ea...> - 2002-08-27 02:42:54
|
----- Original Message ----- From: "William Shotts" <wes...@co...> To: <Lin...@li...> Sent: Monday, August 26, 2002 7:33 PM Subject: Re: [Linuxcommand-discuss] Greetings & a Script > > Here's one that I use all the time.....I call it fe for > > "file explorer"...... > > > > There are actually two- the main one puts the $PWD > > in a temp file in my $HOME when I choose EXIT, > > then . dc (that's a dot and a space for 'source' ) cds > > me to that directory . > > > > > > > > ----------------------------------------------------- > > > > > > #!/bin/bash > > ###2.05 > > ### fe > > while : ; do > > select fname in $HOME / EXIT $(ls -aF) ; do > > if [ "$fname" = EXIT ] ; then > > echo "$PWD" > /home/farley931/.t2 > > exit; fi > > if [ -f "$fname" ] ; then > > less "$fname" > > elif [ -d "$fname" ] ; then > > cd "$fname" > > echo "$PWD" > > break > > fi > > done > > done > > > > ---------------------------------------------------------- > > ### dc > > cd $(cat /home/farley931/.t2) > > > > -------------------------------------------------------- > > One weird script at a time, man ;-) > :-) Actually this one is very practical, and I literally use it all the time......Haven't used mc since I wrote it... Will get back to you on the streamlined script soon. Bruce<+> > -- > ||||| William Shotts, Jr. (bshotts AT panix DOT com) > ||||| Be a Linux Commander! Follow me to http://linuxcommand.org > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > Linuxcommand-discuss mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxcommand-discuss |
From: William S. <wes...@co...> - 2002-08-27 02:33:23
|
On Monday 26 August 2002 10:16 pm, Bruce Burhans wrote: > > #!/bin/bash > > > > old=$1 > > new=$2 > > > > for i in *$old; do > > k=$(basename $i $old) > > mv $i $k$new > > done > Will give it a try, Bill........But will it skip over > files that do not have the old extension? I think so. The wildcard expansion in the "for" command should only include files that end with the old extension. > Here's one that I use all the time.....I call it fe for > "file explorer"...... > > There are actually two- the main one puts the $PWD > in a temp file in my $HOME when I choose EXIT, > then . dc (that's a dot and a space for 'source' ) cds > me to that directory . > > > > ----------------------------------------------------- > > > #!/bin/bash > ###2.05 > ### fe > while : ; do > select fname in $HOME / EXIT $(ls -aF) ; do > if [ "$fname" = EXIT ] ; then > echo "$PWD" > /home/farley931/.t2 > exit; fi > if [ -f "$fname" ] ; then > less "$fname" > elif [ -d "$fname" ] ; then > cd "$fname" > echo "$PWD" > break > fi > done > done > > ---------------------------------------------------------- > ### dc > cd $(cat /home/farley931/.t2) > > -------------------------------------------------------- One weird script at a time, man ;-) -- ||||| William Shotts, Jr. (bshotts AT panix DOT com) ||||| Be a Linux Commander! Follow me to http://linuxcommand.org |
From: Bruce B. <bbu...@ea...> - 2002-08-27 02:17:05
|
----- Original Message ----- From: "William Shotts" <wes...@co...> To: <lin...@li...> Sent: Monday, August 26, 2002 6:08 PM Subject: Re: [Linuxcommand-discuss] Greetings & a Script > On Sunday 25 August 2002 01:26 pm, Bruce Burhans wrote: > > > #!/bin/bash > > # 2.05 > > old=$1 > > new=$2 > > for i in $( ls ); do > > if [[ $i != *$old ]]; then > > shift > > else > > k=$( basename $i ${old} ) > > > > mv $i ${k}${new} > > fi > > done > > First, you could simplify it by doing the following: > > #!/bin/bash > > old=$1 > new=$2 > > for i in *$old; do > k=$(basename $i $old) > mv $i $k$new > done > > I haven't tested this, but it looks right ;-) > > -- > ||||| William Shotts, Jr. (bshotts AT panix DOT com) > ||||| Be a Linux Commander! Follow me to http://linuxcommand.org > > Will give it a try, Bill........But will it skip over files that do not have the old extension? Here's one that I use all the time.....I call it fe for "file explorer"...... There are actually two- the main one puts the $PWD in a temp file in my $HOME when I choose EXIT, then . dc (that's a dot and a space for 'source' ) cds me to that directory . ----------------------------------------------------- #!/bin/bash ###2.05 ### fe while : ; do select fname in $HOME / EXIT $(ls -aF) ; do if [ "$fname" = EXIT ] ; then echo "$PWD" > /home/farley931/.t2 exit; fi if [ -f "$fname" ] ; then less "$fname" elif [ -d "$fname" ] ; then cd "$fname" echo "$PWD" break fi done done ---------------------------------------------------------- ### dc cd $(cat /home/farley931/.t2) -------------------------------------------------------- Bruce<+> |
From: Bruce B. <bbu...@ea...> - 2002-08-27 01:54:23
|
----- Original Message ----- From: "Karl Vogel" <vo...@dn...> To: <lin...@li...> Sent: Sunday, August 25, 2002 4:13 PM Subject: [Linuxcommand-discuss] Re: Bash script for renaming files > >> On Sun, 25 Aug 2002 12:02:28 -0700, > >> "Bruce Burhans" <bbu...@ea...> said: > > B> Here's a script I wrote that I woouldn't mind some feedback > B> on.......It's for changing the extensions on files in the pwd and skips > B> over files without the extension entered as the first argument..... > > This perl script does the same thing, but allows you to see what would > be renamed without actually renaming it. [snip] Wow....That's heavy, Karl.......But I am not personally interested in Perl, and I could get the same functionality from bash with a 1/10 of the code..... A function that offered each file up for a y/n decision would be simple enough, IF I thought it was necessary... Do you do bash too? And if so, can you relate your skills to a newbie like me? That's some pretty sophisticated programming ......! ! ! I am slowly learning C too.....Not the o-o variety , though..... Bruce<+> |
From: William S. <wes...@co...> - 2002-08-27 01:08:29
|
On Sunday 25 August 2002 01:26 pm, Bruce Burhans wrote: > #!/bin/bash > # 2.05 > old=$1 > new=$2 > for i in $( ls ); do > if [[ $i != *$old ]]; then > shift > else > k=$( basename $i ${old} ) > > mv $i ${k}${new} > fi > done First, you could simplify it by doing the following: #!/bin/bash old=$1 new=$2 for i in *$old; do k=$(basename $i $old) mv $i $k$new done I haven't tested this, but it looks right ;-) -- ||||| William Shotts, Jr. (bshotts AT panix DOT com) ||||| Be a Linux Commander! Follow me to http://linuxcommand.org |
From: Karl V. <vo...@dn...> - 2002-08-26 23:16:51
|
>> On Sun, 25 Aug 2002 12:02:28 -0700, >> "Bruce Burhans" <bbu...@ea...> said: B> Here's a script I wrote that I woouldn't mind some feedback B> on.......It's for changing the extensions on files in the pwd and skips B> over files without the extension entered as the first argument..... This perl script does the same thing, but allows you to see what would be renamed without actually renaming it. -- Karl Vogel ASC/YCOA, Wright-Patterson AFB, OH 45433 vo...@dn... http://www.dnaco.net/~vogelke I've discovered that using VMS is a lot like driving a nail with your head: sure, you eventually get something practical done, but it usually results in a headache and some blood loss. --Sean A. Simpson --------------------------------------------------------------------------- #!/usr/local/bin/perl # # From rw...@ta... Sat Mar 7 19:12:58 1992 # From: rw...@ta... (Bob Kerns) # Subject: improved rename command. # Date: Tue, 3 Mar 1992 05:38:21 GMT # # Here's my improved rename command I mentioned in my earlier post. # # In particular, it lets you express the renaming in terms of patterns # of wildcards instead of regexps. (You can still specify a regexp # if you want). It will also copy, if you'd like. 'di'; 'ig00'; # This is both a perl script and a man page. # Pretty much a complete rewrite of Larry Wall's rename hack, # to more careful not to clobber files or rename multiple files # to the same thing. $DeleteOK = 0; $showpattern = 0; $nodoit = 0; $perlit = 0; sub usage { print STDERR "Usage: rename [-copy [-p]] [-i] [-delete] 'source-pattern' 'dest-pattern' - or - rename [-copy [-p]] [-i] [-s] [-n] [-delete] -e 'perl-expression' [filenames] Flags: -copy copy files -i interactive -e perl expression -p preserve dates -s show perl regexps -delete allow deletion -n No action (just print) >>> Don't forget the quotes! <<<\n"; exit(-1); } sub die { print STDERR (@_,"\n"); $nodoit || exit(-1); } sub unbrace { local ($x) = (@_); $x =~ s/\\\{/\(/; $x =~ s/\\\,/\|/g; $x =~ s/\\\}/\)/; return $x; } sub expand_udir { local($fname) = @_; local($flag,$uname) = ($fname =~ m!^(\~([^/]*))\/! ); if ($flag) { if ($uname) { local($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$dir,$shell) = getpwnam($uname); $fname =~ s!^\~[^/]*\/!$dir\/!; } else { local($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$dir,$shell) = getpwuid($<); $fname =~ s!^\~\/!$dir\/!; } } return($fname); } # Routine to compute highest version number. sub newest { local($fname) = @_; local($highest) = (0); $fname || ($fname = $_); $fname =~ s/\~\d+\~/\~\*\~\$/ || ($fname .= "~*~"); foreach $file (<${fname}>) { ($version) =~ /\~(d+)\~$/; ($version > $highest) && ($highest = $version); } return($highest); } # First, scan for options. while (1) { ($op = shift) || &usage; ($op =~ /^-delete$/ ) && do { ($DeleteOK = 1); next; }; ($op =~ /^-s$/ ) && do { ($showpattern = 1); next; }; ($op =~ /^-n$/ ) && do { ($nodoit = 1); next; }; ($op =~ /^-copy$/ ) && do { ($copy = 1); next; }; # This is only meaningful for -copy, but since it makes copy behave more like # rename, accept it without complaint from users who might 'just want to be sure'. ($op =~ /^-p$/ ) && do { (@cpopts = ("-p")); next; }; ($op =~ /^-i$/ ) && do { ($interactive = 1); next; }; ($op =~ /^-e$/ ) && do { ($perlit = 1); next; }; # otherwise unshift(@ARGV, $op); last; }; if ($perlit) { ($op = shift) || &usage; @files = @ARGV; if (!@files) { @files = <STDIN>; chop(@files); } $showpattern && print STDERR ("Using perl expression \'$op\'\n"); } else { ($#ARGV != 1) && &usage; ($spattern, $dpattern) = @ARGV; $spattern = &expand_udir($spattern); $dpattern = &expand_udir($dpattern); $spattern =~ m#^[^\*\?\{\}]*\/#; $head=$&; if ($head) { $newhead = <${head}>; if ($newhead ne $head) { $wd = `pwd`; print STDERR ("Replacing $head with $newhead.\n"); $spattern =~ s*^$head*$newhead*; } } $spattern =~ s/\W/\\$&/g; # Quote everything needing it. $spattern =~ s/(^|[^\\])\\\*/$1(.*)/g; # Turn wildcards into regexps $spattern =~ s/(^|[^\\])\\\?/$1(.)/g; $spattern =~ s/(^|[^\\])(\\\{\S+(\\\,\S+)+\\\})/ $1 . &unbrace($2) /eg; $dpattern =~ s/\W/\\$&/g; # Quote everthing needing it in destination. for ($i=1; ($dpattern =~ s/\\(\*|\?)/\${$i}/) ; $i++) {}; $foo=$op; @files = <${foo}>; $op = "s/$spattern/$dpattern/"; $showpattern && print STDERR ("Using perl expression \'$op\'\n"); }; %seen=(); foreach (@files) { $was = $_; eval $op; die $@ if $@; if ($seen{ $_ }) { &die("$was and $seen{$_} would both rename to $_."); } $seen{ $_ } = $was; $_ = $was; # Undo the change for the next pass. } $DeleteOK && print STDERR ">> Overwritting existing files is enabled (-d option).\n"; $nodoit && print STDERR ">> No changes will actually be made (-n option).\n"; FILE: for (@files) { $was = $_; eval $op; die $@ if $@; if ($was eq $_) { print STDERR ("$was unchanged.\n"); } else { $overwrite = (($DeleteOK && (-e $_)) ? ' (overwrite)' : ""); print STDOUT ("$was -> $_$overwrite\n"); if ($interactive) { QUERY: while (1) { local($input); print STDERR ("OK? "); (($input=<STDIN>) =~ /^\s*y|yes/i) && last QUERY; ($input =~ /\s*n|no/i) && next FILE; } } if (!(-e $was)) { &die("Source file does not exist: $was"); } if (!$DeleteOK && (-e $_)) { &die("Target file exists: $_"); } elsif (!$nodoit) { $!=0; if ($copy) { local($err); ($err = system("cp", "-p", $was, $_)) && ($! = ($err >> 8)) && &die("Could not copy: $!"); } else { rename($was,$_) || &die ("Error while renaming: $!"); } } } } ############################################################################## # These next few lines are legal in both Perl and nroff. .00; # finish .ig 'di \" finish diversion--previous line must be blank .nr nl 0-1 \" fake up transition to first page again .nr % 0 \" start at page 1 ';<<'.ex'; #__END__ ############# From here on it's a standard manual page ############ .TH RENAME 1 "October 8, 1991" .AT 3 .SH NAME rename \- renames multiple files .SH SYNOPSIS .B rename .I [options] 'spattern' 'dpattern' .break .B rename .I [options] -e .I perlexpr [files] .SH DESCRIPTION .I Rename .nf .I Option Meaning -copy copy -p preserve dates -i interactive -s show generated perl regular expression. -n nothing. Do nothing, just indicate what would be done. -delete Allow deleting of files to occur. -e Perl expression, instead of wildcard patterns. .fi Renames the filenames, carefully. Without the -e option, it renames files by wildcard pattern. All the files which match the pattern 'spattern' are transformed into files which match the pattern 'dpattern'. 'spattern' can have any combination of '*', '?', and '{h,c}' wildcards. You should supply a '*' where you in 'dpattern' where you would like the corresponding matched component to appear in the destination filename. You may use more than one wildcard, but they must appear in the destination in the same order. If you wish to use wildcards in directory names, some restrictions apply regarding directory links; see the section on .B BUGS With the -e option, the first argument is a Perl expression which is expected to modify the $_ string in Perl for at least some of the filenames specified. If a given filename is not modified by the expression, it will not be renamed. When using the -e option, if no filenames are given on the command line, filenames will be read via standard input. The -delete option allows existing files to be deleted to allow the rename or copy. The -s option shows the perl expression which will be used to perform the rename. This is useful with the -n option, if you might want to supply your own perl expression using the -p option. Use -s -n to see what expression would be used and its effects, and then use the -n -e options to try out your own expression and see its effects, and then when you're happy, drop the -n option to actually perform it. If the -copy option is specified, it copies using cp. You may supply the -p option to preverve the creation dates. (I considered making that the default, but decided it would be too inconsistent with other Un*x 'tools'). The -i (interactive) option asks you yes or no for each file. .PP For example, to rename all files matching *.bak to strip the extension, you might say .nf rename '*.bak/' '*' .fi or .nf rename -e 's/\\.bak$//' *.bak .fi To translate uppercase names to lower, you'd use .nf rename -e 'y/A-Z/a-z/' * .fi .SH RESTRICTIONS If you give a perl expression, it will be evaluated twice per file. The first time is during a scan to see if any two filenames might conflict. Be sure not to write an expression which cannot be safely executed twice. (This would be hard to do on one comand line). .nf rename 'foo*bar?baz' 'foo?bar*baz' .fi is a noop. In the replacement expression, ? and * are treated exactly the same. .SH ENVIRONMENT No environment variables are used. .SH FILES .SH AUTHOR Bob Kerns, Cambridge Research Labs, Digital Equipment Corporation. A nearly-complete rewrite of something by Larry Wall, perlmeister. .SH "SEE ALSO" mv(1) .br perl(1) .SH DIAGNOSTICS If you give an invalid Perl expression you'll get a syntax error. .SH BUGS Symbolic directory links, and ~ are not handled well, because the shell may expand these into filenames which no longer match the source pattern. This will occur when wildcards in directory names and symbolic links in the directory path are combined too intimately. We carefully get around the problem for directories appearing before the first wildcard. Names of symbolic links, occurring to the right of wildcards, will confuse it, resulting in it not renaming any files, as in the example below. ('test' is a symbolic link under ~rwk/vm/src to /udir/rwk/vm-test.). .nf taunton:~> rename -s '~rwk/vm/src/*/foo.c' '../test/foo.c.old' Replacing ~rwk/vm/src/ with /udir/rwk/vm/src/. Using perl expression 's/\\/udir\\/rwk\\/vm\\/src\\/(.*)\\/foo\\.c/\\.\\.\\/test\\/foo\\.c.old/' /udir/rwk/vm-test/foo.c unchanged. .fi .ex |
From: Bruce B. <bbu...@ea...> - 2002-08-25 17:26:35
|
Hello everyone.....Like I assume most of you are, I am new to Linux and learning Bash..... Here's a script I wrote that I woouldn't mind some feedback on.......It's for changing the extensions on files in the pwd and skips over files without the extension entered as the first argument..... #!/bin/bash # 2.05 old=$1 new=$2 for i in $( ls ); do if [[ $i != *$old ]]; then shift else k=$( basename $i ${old} ) mv $i ${k}${new} fi done Thanks to HoBoJack for telling me about LC. I have yet to receive any mail from the list, so maybe someone could look into that? Bruce<+> |
From: Mertens B. <bra...@li...> - 2002-08-10 08:36:22
|
Hi, Thx, it works! I can now create a backup (in YYYYmmdd.tar.gz format) of any directory by "bu SOURCE DEST" If the DEST directory doesn't exist it will be created, if a file with that name already exist the backup will be created as YYYYmmdd-x.tar.gz where x is an increasing number up to 10. I still have to edit the script, make it look a bit better and add a warning after the last backup, possibly asking the user to "go for another 10 attempts" or something, but I'm very happy already! Amazing, in exactly 1 week I've gone from not knowing how to start writing a script to a fully functional backup script! Thanks again for all the help! If you want I can send you the script after I've made some more changes. Regards, On Sat, 2002-08-10 at 00:01, William Shotts wrote: > You were close in your example above. Try ${2%/} -- # Mertens Bram "M8ram" <bra...@li...> # # Registered [Red Hat] Linux User # 249103 since Octobre 2000 # # http://linux.be | http://www.redhat.com | http://counter.li.org # # Red Hat Linux 7.3 KDE 3.0.0-10 kernel 2.4.18-3 i686 128MB RAM # |
From: William S. <wes...@co...> - 2002-08-09 22:02:12
|
On Wednesday 07 August 2002 04:21 am, Mertens Bram wrote: > Hi, > > I'm trying to figure out how to perform a regular expression as the > expression for an if-statement: > > I want it to either strip the trailing / if it's present or add it if it > isn't. > > I thought the second would be easier since it wouldn't require creating > a substring but I can't get it to work! I've tried for over an hour > yesterday using every expression I could think of! > > Here's the if-statement: > if [ ! "expr $2 match'.*/$'" ]; then > TARGET_DIR=$2/ > echo "target dir changed to ${TARGET_DIR}" > fi > > Some of the things I tried are > [ ! $2 = .*/$ ] > [ ! $2 : .*/$ ] > [ ! "expr $2 ='.*/$'" ] > [ ! "expr $2 match'.*/$'" ] > [ ! "${2}" = "*/$" ] and [ ! "${2}" = ".*/$" ] > with no quotes, double quotes, single quotes, brackets, etc. > I've also tried with and without spaces after the ":" or "=" or > "match"... > > Part of the problem is that I don't know what the correct regular > expression is. Sometimes you ".*" sometimes it's just "*" (not to > mention quotes and brackets!) > > I found something about pattern matching in a reference book called > "Linux in a nutshell" but I can't find examples. > > Should anybody have this book it's in table 4-17 (at least in my > translated version). These are the 4 possibilities: > ${VAR#PATTERN} > ${VAR##PATTERN} > ${VAR%PATTERN} > ${VAR%%PATTERN} > > If I understand it correctly I would need something like: > ${${2}%/} but I get "bad substitution" > > Any suggestions? > > TIA ${VAR%PATTERN} will match the shortest part of PATTERN and will delete it from the end of the string. To remove a trailing "/" you could do something like this: foo=/some/kind/of/path/ echo ${foo%/} /some/kind/of/path You were close in your example above. Try ${2%/} bash does not really have regular expression matching, just wildcards. Some other commands that are useful for this kind of problem include: basename dirname egrep -- ||||| William Shotts, Jr. (bshotts AT panix DOT com) ||||| Be a Linux Commander! Follow me to http://linuxcommand.org |
From: Mertens B. <bra...@li...> - 2002-08-07 08:21:35
|
Hi, I'm trying to figure out how to perform a regular expression as the expression for an if-statement: I want it to either strip the trailing / if it's present or add it if it isn't. I thought the second would be easier since it wouldn't require creating a substring but I can't get it to work! I've tried for over an hour yesterday using every expression I could think of! Here's the if-statement: if [ ! "expr $2 match'.*/$'" ]; then TARGET_DIR=$2/ echo "target dir changed to ${TARGET_DIR}" fi Some of the things I tried are [ ! $2 = .*/$ ] [ ! $2 : .*/$ ] [ ! "expr $2 ='.*/$'" ] [ ! "expr $2 match'.*/$'" ] [ ! "${2}" = "*/$" ] and [ ! "${2}" = ".*/$" ] with no quotes, double quotes, single quotes, brackets, etc. I've also tried with and without spaces after the ":" or "=" or "match"... Part of the problem is that I don't know what the correct regular expression is. Sometimes you ".*" sometimes it's just "*" (not to mention quotes and brackets!) I found something about pattern matching in a reference book called "Linux in a nutshell" but I can't find examples. Should anybody have this book it's in table 4-17 (at least in my translated version). These are the 4 possibilities: ${VAR#PATTERN} ${VAR##PATTERN} ${VAR%PATTERN} ${VAR%%PATTERN} If I understand it correctly I would need something like: ${${2}%/} but I get "bad substitution" Any suggestions? TIA -- | Mertens Bram "M8ram" <bra...@li...> | Registered [Red Hat] Linux User # 249103 since Octobre 2000 | http://linux.be | http://www.redhat.com | http://counter.li.org \____________________________ |
From: Norman B. R. <rob...@ze...> - 2002-08-07 00:47:16
|
Of course all shells are different - else you wouldn't have so damn many! That said: Directly executing a script opens a new shell and each command in that script is only within that shell. When the script exits, so does that seperate shell process. 1. From the current shell, have an executable script "somescript". Type "somescript". You can do this yourself and call the shell process you want it to run in, and pass default shell parameters. 2. From the current shell, have an executable script "somescript". Type "bash somescript". You can also run your script with the 'x' option to test things out; "bash -x testscript" and watch the script execute! You can also execute a script within the context of the current shell, and have that script interact with the shell. 3. From the current shell, have an executable script "somescript". Type "source testscript". Also of interest: If you read the BASH manpage, it indicates the --norc option (which is on by default if the shell is invoked as 'sh') ~/.bashrc will not be read or executed. You can also read about the option --noprofile. This would cause the shell not to read the /etc/profile, ~/.bash_profile, ~/.bash_login, or ~/.profile. Notice you don't see ~/.bashrc in the --noprofile option <is this a hint?> Hope this gives you something to think about, Norman. William Shotts wrote: >That is a really interesting question. I have noticed on my RH box that >scripts do inherit the aliases of the user. I saw where this was >controlled once, but I can't remember where. I would perfer the >behavior you describe since it would make the execution environment >more predictable/secure. Perhaps one of our more enlightened members will >know the answer. > >||||| William Shotts, Jr. (bshotts AT panix DOT com) >||||| Be a Linux Commander! Follow me to http://linuxcommand.org > >On 6 Aug 2002, Mertens Bram wrote: > > > >>Hi, >> >>I added some aliases to my ~/.bashrc file like >>alias lh='ls -lh' >>and restarted my konsole to activate the changes (which works fine) but >>now I tried to call that alias from a script and I get: >>/home/M8ram/bin/bu: lh: command not found >> >>Is this because shell scripts are executed in a non-interactive shell? >> >>Is it possible to use aliases in scripts? (Without defining them in the >>script? >> >>I know I'm being really lazy! :))) >> >>Thanks >>-- >>| Mertens Bram "M8ram" <bra...@li...> >>| Registered [Red Hat] Linux User # 249103 since Octobre 2000 >>| http://linux.be | http://www.redhat.com | http://counter.li.org >> \____________________________ >> >> >> >> >>------------------------------------------------------- >>This sf.net email is sponsored by:ThinkGeek >>Welcome to geek heaven. >>http://thinkgeek.com/sf >>_______________________________________________ >>Linuxcommand-discuss mailing list >>Lin...@li... >>https://lists.sourceforge.net/lists/listinfo/linuxcommand-discuss >> >> >> > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Linuxcommand-discuss mailing list >Lin...@li... >https://lists.sourceforge.net/lists/listinfo/linuxcommand-discuss > > > |
From: William S. <wes...@co...> - 2002-08-07 00:32:26
|
On Tuesday 06 August 2002 04:59 pm, William Shotts wrote: > That is a really interesting question. I have noticed on my RH box that > scripts do inherit the aliases of the user. I saw where this was > controlled once, but I can't remember where. I would perfer the > behavior you describe since it would make the execution environment > more predictable/secure. Perhaps one of our more enlightened members will > know the answer. > > ||||| William Shotts, Jr. (bshotts AT panix DOT com) > ||||| Be a Linux Commander! Follow me to http://linuxcommand.org > > On 6 Aug 2002, Mertens Bram wrote: > > Hi, > > > > I added some aliases to my ~/.bashrc file like > > alias lh='ls -lh' > > and restarted my konsole to activate the changes (which works fine) but > > now I tried to call that alias from a script and I get: > > /home/M8ram/bin/bu: lh: command not found > > > > Is this because shell scripts are executed in a non-interactive shell? > > > > Is it possible to use aliases in scripts? (Without defining them in the > > script? > > > > I know I'm being really lazy! :))) > > > > Thanks > > -- > > > > | Mertens Bram "M8ram" <bra...@li...> > > | Registered [Red Hat] Linux User # 249103 since Octobre 2000 > > | http://linux.be | http://www.redhat.com | http://counter.li.org > > > > \____________________________ > > Jeez! What was I thinking? You can easily do what you want by including the following line near the beginning of your script: . ~/.bashrc The leading dot and space are important. They are shorthand for the source command. Source reads a file and includes it in your script. It is useful for including libraries of common functions, constants, etc. This will work your scripts but probably would not be useful for scripts shared by other users. To solve this problem, you should look at /etc/bashrc and /etc/profile files which provide the common environment for all users. -- ||||| William Shotts, Jr. (bshotts AT panix DOT com) ||||| Be a Linux Commander! Follow me to http://linuxcommand.org |
From: Mertens B. <bra...@li...> - 2002-08-06 21:11:53
|
On Sun, 2002-08-04 at 16:12, William Shotts wrote: > To eliminate the need for the "hard-coded" values in SOURCE_DIR and > TARGET_DIR, you would use positional parameters like so: > > #!/bin/bash > > SOURCE_DIR=$1 > TARGET_DIR=$2 > PROGNAME=$(basename $0) # Figure out name of program > DATE=$(date +'%Y%m%d') > [snip] > > if [ -d ${TARGET_DIR}/${DATE} ]; then > echo "you already created a backup today!" > else > mkdir -p $TARGET_DIR/$DATE > cp -r $SOURCE_DIR/* $TARGET_DIR/$DATE > fi I was just playing around with this a bit and I changed it to: else echo "mkdir -p ${TARGET_DIR}" echo "tar -czf ${TARGET_DIR}/${DATE}.tar.gz ${SOURCE_DIR}" fi But I believe this introduces a problem: (the script is called bu) if the user executes the command $ bu oldvcards/ backup/vcards the result is: mkdir -p backup/vcards tar -czf backup/vcards/20020806.tar.gz oldvcards/ which what I want but if the user executes $ bu oldvcards/ backup/vcards/ the result is: mkdir -p backup/vcards/ tar -czf backup/vcards//20020806.tar.gz oldvcards/ Won't the double slash cause a problem? If it does the script should perform a regular expression on the variables, the SOURCE_DIR won't make a difference but the TARGET_DIR should be checked, would this work: if [ ${TARGET_DIR} = .*/$ ] echo "please omit the trailing '/' from ${TARGET_DIR}" fi Is it possible to strip that character automatically? I can only find the 'offset' substring but that seems to work only to omit the beginning characters... In JavaScript it is possible to determine the length of a string, if that is possible in bash I could use the offset command... TIA -- | Mertens Bram "M8ram" <bra...@li...> | Registered [Red Hat] Linux User # 249103 since Octobre 2000 | http://linux.be | http://www.redhat.com | http://counter.li.org \____________________________ |
From: William S. <bs...@pa...> - 2002-08-06 20:59:42
|
That is a really interesting question. I have noticed on my RH box that scripts do inherit the aliases of the user. I saw where this was controlled once, but I can't remember where. I would perfer the behavior you describe since it would make the execution environment more predictable/secure. Perhaps one of our more enlightened members will know the answer. ||||| William Shotts, Jr. (bshotts AT panix DOT com) ||||| Be a Linux Commander! Follow me to http://linuxcommand.org On 6 Aug 2002, Mertens Bram wrote: > Hi, > > I added some aliases to my ~/.bashrc file like > alias lh='ls -lh' > and restarted my konsole to activate the changes (which works fine) but > now I tried to call that alias from a script and I get: > /home/M8ram/bin/bu: lh: command not found > > Is this because shell scripts are executed in a non-interactive shell? > > Is it possible to use aliases in scripts? (Without defining them in the > script? > > I know I'm being really lazy! :))) > > Thanks > -- > | Mertens Bram "M8ram" <bra...@li...> > | Registered [Red Hat] Linux User # 249103 since Octobre 2000 > | http://linux.be | http://www.redhat.com | http://counter.li.org > \____________________________ > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Linuxcommand-discuss mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxcommand-discuss > |
From: Mertens B. <bra...@li...> - 2002-08-06 20:38:48
|
Hi, I added some aliases to my ~/.bashrc file like alias lh='ls -lh' and restarted my konsole to activate the changes (which works fine) but now I tried to call that alias from a script and I get: /home/M8ram/bin/bu: lh: command not found Is this because shell scripts are executed in a non-interactive shell? Is it possible to use aliases in scripts? (Without defining them in the script? I know I'm being really lazy! :))) Thanks -- | Mertens Bram "M8ram" <bra...@li...> | Registered [Red Hat] Linux User # 249103 since Octobre 2000 | http://linux.be | http://www.redhat.com | http://counter.li.org \____________________________ |
From: William S. <wes...@co...> - 2002-08-04 18:32:06
|
On Sunday 04 August 2002 11:59 am, you wrote: > On Sun, 2002-08-04 at 16:12, William Shotts wrote: > > No, cp and mv are not special. While new_script encourages the use of > > named options, there is nothing preventing the use of an argument list > > instead. > > let me see if I understand this correctly: if you don't specify the > options like the script does, you can still "extract" them from the > command as the $1, $2 and so on? > So every WORD that is passed on with the command that is no named option > will get stored in some sort of an array? Yes, this is correct. Actually, this is about the only way to get anything from the command line. The scripts I write for using new_script use the getopts command to process options, but the lesson on positional parameters will demonstrate how to do it with a while, a case, and a bunch of shifts. It is actually a more flexible way to do it, and I will probably change new_script to do it that way. > > I've been reading the Bash man pages but the part about the $ was very > unclear to me... That's why it needs its own lesson ;-) > > > To eliminate the need for the "hard-coded" values in SOURCE_DIR and > > TARGET_DIR, you would use positional parameters like so: > > > > #!/bin/bash > > > > SOURCE_DIR=$1 > > TARGET_DIR=$2 > > PROGNAME=$(basename $0) # Figure out name of program > > > > DATE=$(date +'%Y%m%d') > > > > # Check for arguments > > > > if [ $# -ne 2 ]; then > > echo "Usage: $PROGNAME source_dir destination_dir" 1>&2 > > exit 1 > > fi > > So $# would be some loop going through the array of options? What does > the "2" in the expression stand for? No, $# holds the number of words on the command line in addition to $0 which the name of the command. The "2" is the number of arguments the program requires (source and target directories). The if statement is testing to see if the number of arguments is not equal (-ne) to 2. If it is not equal, then output a usage message and exit with an error. > > > # Check that source directory exists > > > > if [ ! -d $SOURCE_DIR ]; then > > echo "Source directory $SOURCE_DIR does not exist!" 1>&2 > > exit 1 > > if > > > > # Perform the copy > > In the mean time I think I'm going to have it tar -czf to save some > space :), but the principle is the same... > > > if [ -d ${TARGET_DIR}/${DATE} ]; then > > echo "you already created a backup today!" > > else > > mkdir -p $TARGET_DIR/$DATE > > cp -r $SOURCE_DIR/* $TARGET_DIR/$DATE > > fi > > The part about quoting is something I had to read again, it's ore > important than I first thought, I've some experience with JavaScript and > it's a lot less important there... > > > The difference between $VAR and ${VAR} is subtle. > > So, you use {} whenever you need to eliminate ambiguity. > > Indeed, that part was quite clear in the bash man pages, that means I > understood it the first time I read it! :)) > > > You're welcome. Glad it was of use. > > > > By the way, the next lesson I plan to write will cover positional > > parameters, so stay tuned. > > Definitely, I'm looking forward to the next lesson! I like it that the > lessons are focused on the "non-root" tasks, it takes away much of the > fear of "learning by example", which is something I really like. > > Actually related to this, I didn't perform the installation exactly the > way you suggest in the README, to avoid exactly the kind of problems > root permissions can cause. I cp'd the file to my ~/bin directory and > changed its permissions to 700. Also I removed the -f from the rm > commands in the scripts, I know the only file that get deleted are in > the /tmp folder but still. (It actually was the first time I exercised > my rights to modify free software, that may also have been part of the > reason! :)) ) > > Why is the -f there anyway? I don't get any questions since I have full > rights to those files... -f does two things: 1. If the file you are trying to delete does not exist, -f will force rm to not complain about it. 2. -f will override -i. This is useful if, for example, you are on a Red Hat system and rm has been aliased to "rm -i" like it is on the root account. This way you can delete multiple files without being prompted before each one is deleted. > > Thanks for the reply, I'll keep you posted about my progress (though it > may be slow) > > Bram -- ||||| William Shotts, Jr. (bshotts AT panix DOT com) ||||| Be a Linux Commander! Follow me to http://linuxcommand.org |
From: William S. <wes...@co...> - 2002-08-04 14:14:00
|
On Saturday 03 August 2002 06:48 am, you wrote: > Hi, > > I would like to write a shell script that creates a backup of a source > directory to a destination directory. > > However simply cp SRC DEST won't do, here's a brief description: > > backup without parameters or options must copy the default SRC to the > default DEST. but I want to be able to use the script like backup SRC > DEST as well to create backups of other directories. > > Here's why cp won't do: > I want the script to create a directory in DEST in the format (date > +'%Y%m%d') e.g. 20020703 and then copy all files in SRC recursively into > that directory. > But I want to be able to create more than one backup a day if that's > necessary, and I want the script to detect it has already created a > backup and add a number to the name of the dir so it would be like > 20020703-2. So it would have to check recursively until the directory > doesn't exist and then create and copy. > > I only started learning about scripts yesterday, so this might be a > little over my head, but I want to give it a try nonetheless! :) (I can > see you laughing at me already) :) Actually, I think you are doing pretty well for just one day. > > I downloaded and installed the lc_new_script script but if I understand > it right I can only do what I want like "backup -s SRC -d DEST" i.e. > with options, is it possible to do it without those or is that something > exclusive for cp and mv? No, cp and mv are not special. While new_script encourages the use of named options, there is nothing preventing the use of an argument list instead. > > Here's what I've got so far, it isn't near what I want but it's fun > already! > > SOURCE_DIR=~/scripts/ > TARGET_DIR=~/scripts-backup > DATE=$(date +'%Y%m%d') > > if [ -d ${TARGET_DIR}/${DATE} ]; then > echo "you already created a backup today!" > else > mkdir -p $TARGET_DIR/$DATE > cp -r $SOURCE_DIR/* $TARGET_DIR/$DATE > fi This is good so far. To eliminate the need for the "hard-coded" values in SOURCE_DIR and TARGET_DIR, you would use positional parameters like so: #!/bin/bash SOURCE_DIR=$1 TARGET_DIR=$2 PROGNAME=$(basename $0) # Figure out name of program DATE=$(date +'%Y%m%d') # Check for arguments if [ $# -ne 2 ]; then echo "Usage: $PROGNAME source_dir destination_dir" 1>&2 exit 1 fi # Check that source directory exists if [ ! -d $SOURCE_DIR ]; then echo "Source directory $SOURCE_DIR does not exist!" 1>&2 exit 1 if # Perform the copy if [ -d ${TARGET_DIR}/${DATE} ]; then echo "you already created a backup today!" else mkdir -p $TARGET_DIR/$DATE cp -r $SOURCE_DIR/* $TARGET_DIR/$DATE fi > > Here are a couple of things I noticed already: > if you define the above variables like SOURCE_DIR="~/scripts/" the ~ > doesn't get substituted. Good observation. > > Also, but I might have to reread the "writing shell scripts" tutorial > again, why do you sometimes need $VAR and sometimes ${VAR} and on other > occasions $(VAR). the last one seems to be for expressions, am I right? The difference between $VAR and ${VAR} is subtle. Imagine this: You have a file called my_file1 and you want to copy it to my_file2, and you start to write a general script for this task like so: BASEFILE=my_file cp $BASEFILE1 $BASEFILE2 Thinking about this, you see that this won't work because the shell will think that BASEFILE1 and BASEFILE2 are seperate variable names. To fix this, you would do it this way: BASEFILE=my_file cp ${BASEFILE}1 ${BASEFILE}2 So, you use {} whenever you need to eliminate ambiguity. $(VAR) should really be $(command) since this performs command substitution, that is, the results of the command are substituted. > > Thanks a lot in advance, I loved the tutorial! You're welcome. Glad it was of use. By the way, the next lesson I plan to write will cover positional parameters, so stay tuned. -- ||||| William Shotts, Jr. (bshotts AT panix DOT com) ||||| Be a Linux Commander! Follow me to http://linuxcommand.org |
From: Mertens B. <bra...@li...> - 2002-08-03 10:48:45
|
Hi, I would like to write a shell script that creates a backup of a source directory to a destination directory. However simply cp SRC DEST won't do, here's a brief description: backup without parameters or options must copy the default SRC to the default DEST. but I want to be able to use the script like backup SRC DEST as well to create backups of other directories. Here's why cp won't do: I want the script to create a directory in DEST in the format (date +'%Y%m%d') e.g. 20020703 and then copy all files in SRC recursively into that directory. But I want to be able to create more than one backup a day if that's necessary, and I want the script to detect it has already created a backup and add a number to the name of the dir so it would be like 20020703-2. So it would have to check recursively until the directory doesn't exist and then create and copy. I only started learning about scripts yesterday, so this might be a little over my head, but I want to give it a try nonetheless! :) (I can see you laughing at me already) :) I downloaded and installed the lc_new_script script but if I understand it right I can only do what I want like "backup -s SRC -d DEST" i.e. with options, is it possible to do it without those or is that something exclusive for cp and mv? Here's what I've got so far, it isn't near what I want but it's fun already! SOURCE_DIR=~/scripts/ TARGET_DIR=~/scripts-backup DATE=$(date +'%Y%m%d') if [ -d ${TARGET_DIR}/${DATE} ]; then echo "you already created a backup today!" else mkdir -p $TARGET_DIR/$DATE cp -r $SOURCE_DIR/* $TARGET_DIR/$DATE fi Here are a couple of things I noticed already: if you define the above variables like SOURCE_DIR="~/scripts/" the ~ doesn't get substituted. Also, but I might have to reread the "writing shell scripts" tutorial again, why do you sometimes need $VAR and sometimes ${VAR} and on other occasions $(VAR). the last one seems to be for expressions, am I right? Thanks a lot in advance, I loved the tutorial! -- | Mertens Bram "M8ram" <bra...@li...> | Registered [Red Hat] Linux User # 249103 since Octobre 2000 | http://linux.be | http://www.redhat.com | http://counter.li.org \____________________________ |
From: Bill S. <bs...@us...> - 2002-05-21 08:00:02
|
This is the monthly administrative posting for the linuxcommand-discuss mailing list. The purpose of this list is to promote discussion between users of the LinuxCommand.org web site. Discussions should focus on use of the command line interface in Linux and writing bash shell programs. Only subscribers to the list can post messages. If you have multiple email addresses, you should subscribe each one if you wish to post from them. The mailing list is configured so that replies will be sent to the original sender, not the list. If you wish to reply to the list, you must explicitly do so. When posting messages, please include a descriptive subject line. This will help users of the mailing list archive identify relevant postings. General information about the mailing list is at: http://lists.sourceforge.net/mailman/listinfo/linuxcommand-discuss If you ever want to unsubscribe or change your options (eg, switch to or from digest mode, change your password, etc.), visit your subscription page at: http://lists.sourceforge.net/mailman/options/linuxcommand-discuss/you@addr Where "you@addr" is your mailing address. You can also make such adjustments via email by sending a message to: Lin...@li... with the word `help' in the subject or body (don't include the quotes), and you will get back a message with instructions. Thanks and happy postings! |
From: Bill S. <bs...@us...> - 2002-04-21 08:00:02
|
This is the monthly administrative posting for the linuxcommand-discuss mailing list. The purpose of this list is to promote discussion between users of the LinuxCommand.org web site. Discussions should focus on use of the command line interface in Linux and writing bash shell programs. Only subscribers to the list can post messages. If you have multiple email addresses, you should subscribe each one if you wish to post from them. The mailing list is configured so that replies will be sent to the original sender, not the list. If you wish to reply to the list, you must explicitly do so. When posting messages, please include a descriptive subject line. This will help users of the mailing list archive identify relevant postings. General information about the mailing list is at: http://lists.sourceforge.net/mailman/listinfo/linuxcommand-discuss If you ever want to unsubscribe or change your options (eg, switch to or from digest mode, change your password, etc.), visit your subscription page at: http://lists.sourceforge.net/mailman/options/linuxcommand-discuss/you@addr Where "you@addr" is your mailing address. You can also make such adjustments via email by sending a message to: Lin...@li... with the word `help' in the subject or body (don't include the quotes), and you will get back a message with instructions. Thanks and happy postings! |
From: Bill S. <bs...@us...> - 2002-03-21 09:00:03
|
This is the monthly administrative posting for the linuxcommand-discuss mailing list. The purpose of this list is to promote discussion between users of the LinuxCommand.org web site. Discussions should focus on use of the command line interface in Linux and writing bash shell programs. Only subscribers to the list can post messages. If you have multiple email addresses, you should subscribe each one if you wish to post from them. The mailing list is configured so that replies will be sent to the original sender, not the list. If you wish to reply to the list, you must explicitly do so. When posting messages, please include a descriptive subject line. This will help users of the mailing list archive identify relevant postings. General information about the mailing list is at: http://lists.sourceforge.net/mailman/listinfo/linuxcommand-discuss If you ever want to unsubscribe or change your options (eg, switch to or from digest mode, change your password, etc.), visit your subscription page at: http://lists.sourceforge.net/mailman/options/linuxcommand-discuss/you@addr Where "you@addr" is your mailing address. You can also make such adjustments via email by sending a message to: Lin...@li... with the word `help' in the subject or body (don't include the quotes), and you will get back a message with instructions. Thanks and happy postings! |
From: baranidharan T. <ltb...@ho...> - 2002-03-15 16:40:16
|
>hi everybody, I need to view the process remotely running in Linux machine from the Server in LAN. I need the code to be implemented. > > > >_________________________________________________________________ >MSN Photos is the easiest way to share and print your photos: >http://photos.msn.com/support/worldwide.aspx > > > > >--__--__-- > >_______________________________________________ >Linuxcommand-discuss mailing list >Lin...@li... >https://lists.sourceforge.net/lists/listinfo/linuxcommand-discuss > > >End of Linuxcommand-discuss Digest _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |