and put inside it this line:
forward@email.comThen set the permissions to 600.
forward@email.comThen set the permissions to 600.
aliasuser: forward@email.comThen run 'newaliases'.
mysqlimport --fields-terminated-by=, --lines-terminated-by="\n" --user=user--password DATABASE TABLE_NAME.csv
DECLARE @word1 varchar(1000) DECLARE @word2 varchar(1000) DECLARE word_cursor CURSOR LOCAL fast_forward FOR SELECT old_word, new_word FROM word_replace_table OPEN word_cursor FETCH NEXT FROM word_cursor INTO @word1, @word2 WHILE @@FETCH_STATUS = 0 BEGIN SET xact_abort ON BEGIN tran DECLARE @otxt varchar(1000) SET @otxt = @word1 /****/ DECLARE @ntxt varchar(1000) SET @ntxt = @word2 /****/ DECLARE @txtlen int SET @txtlen = len(@otxt) DECLARE @ptr BINARY(16) DECLARE @pos int DECLARE @id int DECLARE curs CURSOR LOCAL fast_forward FOR SELECT productId, textptr(description), charindex(@otxt, description)-1 FROM product WHERE description LIKE '%' + @otxt +'%' OPEN curs FETCH NEXT FROM curs INTO @id, @ptr, @pos WHILE @@fetch_status = 0 BEGIN print 'Text found in row id=' + cast(@id AS varchar) + ' at pos=' + cast(@pos AS varchar) updatetext product.description @ptr @pos @txtlen @ntxt FETCH NEXT FROM curs INTO @id, @ptr, @pos END CLOSE curs DEALLOCATE curs commit tran FETCH NEXT FROM word_cursor INTO @word1, @word2 END CLOSE word_cursor DEALLOCATE word_cursor
cat options.csv | sed "s/[^M]$//" > options1.csv
#!/bin/bash for i in $(ls); do oldname="$i" newname=$(echo "$oldname" | tr 'A-Z' 'a-z') if [ "$oldname" != "$newname" ] then mv -i "$oldname" "$newname" fi done
/* * * Search & Replace * * Use Ctrl+Shift+M to replace template values * */ set xact_abort on begin tran declare @otxt varchar(1000) set @otxt = '' declare @ntxt varchar(1000) set @ntxt = '' declare @txtlen int set @txtlen = len(@otxt) declare @ptr binary(16) declare @pos int declare @id int declare curs cursor local fast_forward for select id, textptr(), charindex(@otxt, )-1 from where like '%' + @otxt +'%' open curs fetch next from curs into @id, @ptr, @pos while @@fetch_status = 0 begin print 'Text found in row id=' + cast(@id as varchar) + ' at pos=' + cast(@pos as varchar) updatetext . @ptr @pos @txtlen @ntxt fetch next from curs into @id, @ptr, @pos end close curs deallocate curs commit tran
find /home/rory/backup/Mail/outbox/ -type f -name '*' -exec cp {} /home/rory/Mail/outbox/ \;
find . -name '*.html' | xargs perl -pi -e 's/\r//g;'
#!/usr/bin/perl # check the image size and move to a horizontal # or vertical subdirectory use Image::Size; use File::Copy; use strict; my $dir = "/home/rory/Jobs/images/cig_images/"; my $horiz = $dir . "horizontal"; my $vert = $dir . "vertical"; # read the files opendir(DIR, $dir) || die "can't opendir $dir: $!"; my @images = readdir(DIR); closedir(DIR); # loop thru images foreach my $image (@images) { my $fullpath = $dir . $image; if (not(-d $fullpath)) { # exclude directories # check what dimension of the image is longer my ($x, $y) = imgsize("$fullpath"); if ($x>$y) { move("$fullpath", "$horiz/$image") || die "move failed: $!"; } else { move("$fullpath", "$vert/$image") || die "move failed: $!"; } print "$fullpath $x $y\n"; } # end if for not a directory } # end foreach loop thru images
crypt < oldfile > newfileThe system prompts you for a password.
crypt < encrypted_file > new_filename
wget -r -l1 --no-parent -A.mp3 -R.html,.gif http://www.mysite.com/mp3/
// for stripping strings of non alphanumeric stuff and replacing with + // should really be a class public String reformat(String categoryName) { StringBuffer reformattedString = new StringBuffer(); if (categoryName != null) { char[] chars = categoryName.toCharArray(); for (int ii = 0; ii < chars.length; ii++) { if (Character.isLetterOrDigit(chars[ii])) { reformattedString.append(chars[ii]); } else if (Character.isSpaceChar(chars[ii])) { if (reformattedString.length() > 0 && reformattedString.charAt(reformattedString.length() - 1) != '_') { reformattedString.append('_'); } } } } return reformattedString.toString(); }
/sbin/ifconfig | sed -n -e "s/^.*addr://g" -n -e "s/ Bcast.*//p" | grep -v '192.168.0.20'