rename "s/\'//g" *
rename -v "s/(\'|-)//g" *
[guest@localhost ~]$ \
> func ()
> {
> read s
> for ((i = 0; i < ${#s}; i++)); do
> c=${s:$i:1}
> case $c in
> "а") oc="a";;
> "б") oc="b";;
> "в") oc="v";;
> "г") oc="g";;
> "и") oc="i";;
> "й") oc="j";;
> "к") oc="k";;
> "л") oc="l";;
> "н") oc="n";;
> "о") oc="o";;
> "с") oc="s";;
> "я") oc="ya";;
> *) oc="$c";;
> esac
> echo -n "$oc"
> done
> echo
> }
[guest@localhost ~]$
[guest@localhost ~]$ echo "яблонский головоног" | func
yablonskij golovonog
[guest@localhost ~]$
[guest@localhost tmp]$ touch file{1,2,3}.txt
[guest@localhost tmp]$
[guest@localhost tmp]$ ls file*.txt
file1.txt file2.txt file3.txt
[guest@localhost tmp]$ ls file*.txt | sed 's%\([^.]*\)\(\.txt\)%mv & \1_save\2%'
mv file1.txt file1_save.txt
mv file2.txt file2_save.txt
mv file3.txt file3_save.txt
[guest@localhost tmp]$ ls file*.txt | sed 's%\([^.]*\)\(\.txt\)%mv & \1_save\2%' | sh
[guest@localhost tmp]$ ls file*.txt
file1_save.txt file2_save.txt file3_save.txt
[guest@localhost tmp]$
rename -n "y/'/\z/" *.mp3
rename -n "y/'`/\z/" *.mp3
SELECT COUNT(*) FROM `votes_log` WHERE date > NOW() - INTERVAL '3 DAY' AND user_id=?
$str = "";
foreach($forwr as $massiv) {
$str .= "{$massiv['id']},{$massiv['name']},{$massiv['title']}" . PHP_EOL;
}
file_put_contents ("/domen/file.txt", $str, FILE_APPEND);