All pastes #538289 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-06-05 00:13 UTC
rendered paste body
#! /bin/bash

maps=$(echo /home/randy/.df/local_map-1-*)

while [ -a ${maps:43:42} ]; do
	rm ${maps:0:42}
	maps=$(echo /home/randy/.df/local_map-1-*);
done

gthumb ${maps:0:42}



randy@Fred:~$ maps=$(echo /home/randy/.df/local_map-1-*)
randy@Fred:~$ echo $maps
/home/randy/.df/local_map-1-1053-31596.bmp /home/randy/.df/local_map-1-1053-31655.bmp
randy@Fred:~$ echo ${maps:0:42}
/home/randy/.df/local_map-1-1053-31596.bmp
randy@Fred:~$ echo ${maps:43:42}
/home/randy/.df/local_map-1-1053-31655.bmp
randy@Fred:~$ echo ${maps:1:4}
home
randy@Fred:~$ if [ "${maps:1:4}"=="home" ]; then echo true; fi
true
randy@Fred:~$ if [ "${maps:870:4}"=="home" ]; then echo true; fi
true
randy@Fred:~$ home=$(echo home)
randy@Fred:~$ echo $home
home
randy@Fred:~$ if [ ${maps:870:4}==$home ]; then echo true; fi
true
randy@Fred:~$ if [ "${maps:870:4}"=="$home" ]; then echo true; fi
true
randy@Fred:~$ if [[ "${maps:870:4}"=="$home" ]]; then echo true; fi
true