First  |  Prev |  Next  |  Last
Pages: 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
Delete Chinese characters from the filenames.
Hi all, Suppose I've some files with their names consist Chinese characters and all of these files are resided in the same directory. Now, I want to delete Chinese characters from all of these filenames. What should I do? Thanks in advance. -- ..: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedo... 2 Feb 2010 15:48
Do some simple addition operations under bash by using expr.
Hi all, I want to do the following simple addition operations under bash by using expr: 1- I've two variables, i.e., aa and bb. 2- If the addition of aa + bb is little than 10, it should give me the output with a leading zero like this: 01, 08, 09 or so. 3- If the addition of aa + bb is large than 10, i... 2 Feb 2010 15:48
xen, bash, and random seed failure
Hello, An oft-repeated means for seeding bash $RANDOM is: RANDOM=$$$(date +%s) However on Linux 2.6.18-xen #1 SMP Fri May 18 16:11:33 BST 2007 i686 GNU/Linux thise method is not working for me: RANDOM=$$$(date +%s) echo $RANDOM I keep getting a value of 15929. Why is the seed value invalid? 32-bit OS? ... 2 Feb 2010 15:47
prevent echo to pipe going to stdout
In the following command: if echo "${DIR##*/}" |egrep "^($EXCLUDE)" ; then I'd like to prevent the echo output to the pipe from going to stdout in my script. Is this possible? The entire code (so far) is: EXCLUDE="bin|log|errors" find . -type d |sed 's/ /\\ /g' | { while IFS=" " read -r DIR ;... 2 Feb 2010 15:47
a=X; source <( echo a=Y ); echo $a
Not what I would expect: /tmp $ echo a=Y > foo /tmp $ a=X;source foo; echo $a Y /tmp $ a=X; source <( echo a=Y ) ; echo $a X /tmp $ echo $BASH_VERSION 3.2.49(23)-release What is it I'm missing, why isn't this a bug? -- thanks /tmp $ command od -Ad -c < <( echo a=Y ) 0000000 a = ... 2 Feb 2010 15:47
loop question
Hello All; A question from a new member: Does anybody has any comments to how I can have a 0 before "i" when it is less than 10? I want the code to create files like Ch01PH.inp ... Ch10PH.inp ... Ch20PH.inp. Thanks very much, Mohsen Here comes the code: #!/bin/ksh for i in {1..20} X=Ch$iPH.inp... 2 Feb 2010 15:47
is there a GNU Coreutils-like toolset for binary files?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Over the years, I've learned some ways to handle binary data (mostly numeric) using Shell. E. g.: $ head -c $((4 * $N)) < FILE — gives the first $N ‘floats’ (or 32-bit integers, or whatever of the size 4) of the FILE, while: $ tail -c $((4 *... 2 Feb 2010 15:48
dump as hex value per each character
Hi All How to dump the corresponding Hex value for each character using od or other unix command ? Print original character and the hex value. Data as below A B C 1 2 3 ... 2 Feb 2010 15:47
Bash equivalent of cmd /k switch
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <blockquote cite="mid:7a8f6$4a25987f$4c0aa020$8945(a)TEKSAVVY.COM-Free" type="cite"> <blockquote type="cite"> ... 28 Jan 2010 01:00
global Aqua+Terra MODIS (MCD43B4) mosaic with ncget-hdf, NetPBM and ImageMagick
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Drawn by my quest for bizzare Shell scripts, I've written the one that produces an image file using the nadir BRDF-adjusted spectral reflectances derived from the MODIS sensors data (as featured on the NASA EOS Terra and Aqua satellites.) The script (below) w... 25 Jan 2010 17:21
First  |  Prev |  Next  |  Last
Pages: 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53