Bash 'rename' utility different in Arch & Ubuntu

The rename command in bash on my ubuntu box allows for Perl regular expressions for mass renaming of files:
Synopsis: 
rename perlexpr [ files ]
The rename command in Arch bash is a more simple one:
Synopsis:
rename from to [ files ]
Is it possible to get the ubuntu version of 'rename' for arch ??

alphahsk wrote:Is it possible to get the ubuntu version of 'rename' for arch ??
Yup, it is now available in the AUR.
For further information on the topic, you might want to look at this thread.

Similar Messages

  • Molt: batch renaming utility

    Hi all,
    Recently I was looking for a batch renaming utility, and while I did find a few, none of them would really fill all the checkboxes of my requirements list. Either because they didn’t provide the "rules" I was looking for, or because they would rename files after each rule has been applied, or because they couldn’t be used from scripts (that way I wanted), or whatever the reason. So I made myself one: molt.
    You use it by specifying a set of rules to use, which will all be processed to determine the new name. molt will make sure those new names are "free," as in not already in use; and handles "avoidable conflicts" - when a file's new name is taken by another file to be renamed (performing two-steps renaming with a temporary name if needed).
    Usage: molt [OPTION]... RULE... [FILE]...
    Options :
    -D, --exclude-directories Ignore directories from specified files
    -F, --exclude-files Ignore files from specified files
    -S, --exclude-symlinks Ignore symlinks from specified files
    -i, --from-stdin Get list of files from stdin
    -P, --process-fullname Send the full path/name to the rules
    (Imply --output-fullname)
    -p, --allow-path Allow (relative/absolute) paths in new filenames
    (Imply --output-fullname)
    -m, --make-parents Create parents if needed
    -O, --output-fullname Output full path/names
    -B, --output-both-names Output the old then the new filename for each file
    -N, --output-new-names Output the new filename for each file
    -R, --only-rules Only apply the rules and output results,
    without any conflict detection
    (Imply --dry-run)
    -n, --dry-run Do not rename anything
    -C, --continue-on-error Process as much as possible, even on errors
    or when conflicts are detected
    -d, --debug Enable debug mode - Specify twice for verbose
    output
    -h, --help Show this help screen and exit - Specify twice for
    verbose output
    -V, --version Show version information and exit
    Rules :
    Rules are the part of molt that process filenames. Rules will be applied
    in the order specified, you can use the same rule as may times as you want.
    Some rules require a parameter, what it can be depend of the rule. Usually,
    it will be a string where you can specify multiple parameter using slash ( / )
    as separator.
    --upper Convert to uppercase
    --lower Convert to lowercase
    --vars Resolve variables
    --tpl PARAM Apply specified template (resolve variables)
    --sr PARAM Search & replace a string
    PARAM = search[/replacement[/option]]
    If no replacement is specified, the string will be removed.
    Search is case-sensitive, unless option i was specified.
    --camel Convert to Camel Case
    --list Use list of new names from stdin
    --regex PARAM Search & replace using regular expression
    PARAM = pattern[/replacement[/option]]
    If no replacement is specified, the string will be removed.
    Search is case-sensitive, unless option i was specified.
    Variables :
    You can use variables in the new filenames. The syntax is to put the
    variable's name in between dollar signs, e.g: $FOOBAR$
    You can also (if supported) specify one (or more) parameters, using colon
    as separator, e.g: $FOOBAR:PARAM1:PARAM2$
    Variables are not automatically resolved, you need to use the rule --vars
    in order to have them resolved, which gives you the ability to determine
    when resolving happens, and continue processing with more rules afterwards.
    Note that rule --tpl also resolves variables.
    NB[:PARAM...] Counter, incremented for each file using it
    You can specify up to 3 parameters:
    - the minimum number number of digits (padding with 0's)
    - the starting value of the counter
    - the increment (can be negative)
    E.g: $NB:3:42:-2$ will resolve as 042, 040, 038, etc
    _[:PARAM...] Magic variable: specify "variable" as parameter
    The first parameter is the name of the "variable" to resolve.
    Resolving is done running the corresponding command line, using output
    as value (removing trailing newline (\n) if present)
    Links:
    - Slightly more verbose description
    - Source code
    - PKGBUILD in the AUR
    Hopefully someone may find it useful.
    Cheers,
    -jacky

    Yes, this works. However, this was already part of my workflow.... and not where the trouble lies.
    After exporting jpeg images from Aperture, they carry the same name of the original RAW files, from which they came. (So, IMG_8342.jpg would have started it's life as IMG_8342.CR2.) But we dont' send them out like that. We sequentially name them 0001_image.jpg, 0002_image.jpg, etc... So after renaming, how do you find the original file again, right?
    BEFORE the renaming phase, I would run the "Store Original Names in Spotlight Comments" action. That way, I could look at the comments for a derivative .jpg—whose name has now changed—and determine the name of the ORIGINAL file.
    After renaming, the derivative file might end up being named 0361_image.jpg, but it's Spotlight comments would say, for example, Original Name:<<IMG_8485.jpg>>. Then I would know that this particular file started off as IMG_8485.CR2.
    As such, I could quickly/easily backtrack, knowing that the original RAW file was named IMG_8485.CR2
    The issue is that once you've gone thru the effort to ADD these spotlight comments, if you THEN go through a re-naming step, this erases all those Spotlight Comments. That was my problem... Getting the Spotlight Comments in place was never the issue. KEEPING them there was the problem.

  • Web Analysis rename utility

    "The Rename Utility is a stand-alone application designed to update objects in a Web Analysis repository based on the data source metadata changes."
    Where I can find this utility?
    Thanks all!

    What version of Java do you have installed, I know this version of Web Analysis prefers JVM 1.5.0. If you have anything higher than this remove it and install 1.5.0.
    Brian Chow

  • "rename" default implementation in Arch

    Hi there
    As far of I know, most of recent systems use the "rename" script from larry Wall ( Perl dad ).
    Why don't using it as default "rename" like most of modern systems ? I use Debian/redhat systems most of the time @work, and I was wasting some time to understand that Arch implement "rename" in an other way. I'm pretty sure I'm not the first one, and not the last one too.
    ( For thoses wanting the original perl script from Perl dad, download http://search.cpan.org/CPAN/authors/id/ … 1.6.tar.gz and add it in your $PATH before /usr/bin I use a custom ~/bin dir for that kind of stuff  or see aur/perl-rename )
    See ya.
    Last edited by sputnick (2009-11-20 00:49:30)

    @Xyne : prename is an extract of debian package, it's not needed. The good one is perl-rename http://aur.archlinux.org/packages/perl- … e/PKGBUILD and it's quite maintened.
    I like Arch in part because it use powerfull modern tools and keep users to decide what is good or not ( like non-free stuff ).
    Using something different of Perl rename doesn't makes sense for me, and I think some others users and sysadmins too.
    Edit : Debian default is Larry Wall original script with small changes, his name under debian is prename.
    That's what my debian chroot said :
    # echo 'readlink -f $(type -p rename)' | chroot /home/chroot bash -s
    /usr/bin/prename
    The perl-rename ( PKGBUILD based on CPAN ) is an improved one, ( written by Peder Stray, original script from Larry Wall ) the help output confirm that ( code too ):
    # /usr/bin/perlbin/site/rename --help
    Usage: rename [OPTION]... PERLEXPR FILE...
    Rename FILE(s) using PERLEXPR on each filename.
    -b, --backup make backup before removal
    -f, --force remove existing destinations, never prompt
    -i, --interactive prompt before overwrite
    -S, --suffix=SUFFIX override the usual backup suffix
    -v, --verbose explain what is being done
    -V, --version-control=WORD override the usual version control
    -n, --just-print, --dry-run don't rename, implies --verbose
    -l, --link-only link file instead of reame
    --help display this help and exit
    --version output version information and exit
    The backup suffix is ~, unless set with SIMPLE_BACKUP_SUFFIX. The
    version control may be set with VERSION_CONTROL, values are:
    t, numbered make numbered backups
    nil, existing numbered if numbered backups exist, simple otherwise
    never, simple always make simple backups
    Report bugs to [email protected]
    debian (p)rename :
    # chroot /home/chroot rename --help
    Unknown option: help
    Usage: rename [-v] [-n] [-f] perlexpr [filenames]
    Last edited by sputnick (2009-11-20 01:39:03)

  • Utilizing different exchange rate type for same currency combination

    Hello Gurus,
    I wanted to get your opinion/experience in handling the following scenario.
    We have company codes in different countries operating using different local currencies. There is alternate exchange rate type  EURX defined for Exchange rate type M for many currency combinations due to business requirements. One country with local currency EUR is utilizing EURX SEK - EUR exchange rate combination.
    Other country with local currency HUF is making use of exchange rate type MNB as an alternate exchange rate. In one of its transaction, where VAT is being calculated on its foreign transaction, HUF company is trying to seek rate of MNB SEK- EUR where country currency is SEK and document currency is EUR.
    But since on the 'translation ratios for currency translation' table EURX being the alternate currency for that particular combination, even when we set MNB SEK EUR exchange rate, the system is obviously picks up EURX rate.
    Has anyone come across similar scenario where different countries trying to get different exchange rate types for the same combination of currency? and If so, how would that be possibly handled through config or using something custom?
    Thanks all for your replies in advance.
    Regards,
    Sagar K.

    Hi Sagar,
    In tcode OBBS, if Alt.exchange rate is used for any currency pair, then that rate is used ( EURX in this case).
    All countries in EMU region uses EURX ( which is mostly fixed after introduction of EUR).
    If the company is in different countries in Europe, then mostly EUR is used as Alt. exchange rate. which uses EUR as reference currency.
    Ther is no country specific settings in std. sap for a currency pair.
    Cheers,

  • File Renaming Utility

    Not sure where this post belongs - for now it's here.
    I'm looking for a utility that will simply 'preview' a folder of photos, and give me a quick interface to rename each. In the end, in a finder window, I'll see the name without needing the thumbnail to guess with.
    I would do this in the finder but the thumbnail previews are too small for my purposes, some photos may look identical but to me there will be a major difference and I need to be able to accurately find these.
    thank you.

    PrOdigy ... William,
    Thank you for replying. I think someone needs to take a big stick and beat it in to my head that my needs = tedium, to some degree.
    If I went through some backup DVDs I am certain I would find 'A Better Finder Rename'. Unless I'm missing something it doesn't quite do what I need.
    Using the Get Info routine is as simple as i think it can get.
    Here's a scenario. I'm a remodeling contractor. I'm a photo enthusiast (not quite a hobbyist). I'll download (from camera) two weeks worth of photos, say a 100. The subject matter range could be (for instance):
    Kids
    Pets
    Customer Jobs
    Nature
    Artistic
    Friends
    Vacation
    So first of all I need all the P1000135.JPGs (etc) roughly sorted to subject matter (wondering if keywords may speed this along). Then when they are foldered by subject I import the folder to 'x' and extend the naming convention to detail it a bit. This step changes P1000135.jpg to kids.01.jpg.
    Say there are three kids photos, and I import the Kids folder renaming each to kids.#1.jpg (with sequential numbers). Then again to get kids.dana.1.jpg, kids.jacob.2.jpg, kids.yourkid.3.jpg. Get Info is probably as good as it gets for this step.
    Essentially my work flow is:
    - download from camera;
    - drag and drop to sort subjects;
    - import subject folders to 'x' to change generic (P100013...) to kids.01.jpg;
    - then in Get Info change again to kids.dana.01.jpg.
    Here's some uploaded images of some work I'll be doing soon, you can see the extent I go to 'name' photos.
    http://www.buzottembuilder.com/Images/web_images/pincetich-web-rdy/
    Am I missing something by not using keywords? or other sorting means?
    I have an older version of qpict http://www.qpict.net/ that I keep going back to, thinking it is my answer.
    Or am just too anal retentive.

  • [Solve] Bash: Rename file in folder to sequential numbers saving path

    I have a folder with many subfolders with many files. I want to rename all files to sequential numbers (0001.jpg, 0002.jpg, .0003,jpg ...) but i want to save the path. I mean that the files should not be saved in the root directory (where i launched the script), but I want them to remain in original subdirectorys. How can i do this?
    Last edited by cypherinside (2011-11-14 18:37:16)

    cypherinside wrote:
    for src in "$1"/*; do ## "$1"/*
    are all the subdirectory. Can i use "$(pwd)/*" instead of "$1/*"? In this way i don't write the parent directory
    If you want to specify $PWD, just call the script with an argument of '.' to point it at PWD.
    cypherinside wrote:
    if [[ -d $src ]];
    walk "$src"
    continue
    fi
    I dont' understand
    It's simple recursion. You don't want to rename directories, you want to process the contents of the directory in the same way you're processing the current directory.
    cypherinside wrote:
    printf -v dest '%s/%04d.jpg' "$1" "$(( ++i ))"
    Stores in dest... what? I assume that %s is a string as in C language, infact you give "$1" as argument (but why?). And I assume that  "$((++i))" is like i=$((i+1)). Is it right?
    It's the bash equivalent of sprintf(3).
    cypherinside wrote:
    [[ $1 ]] || exit 1
    I don't understand.
    If $1 doesn't exist (i.e. you passed no arguments to the script), then refuse to run and exit immediately with an error.
    You weren't really clear in your requirements, so I wrote it as I interpreted it. If you want to reset the numbering for each directory, scope 'i' locally:
    #!/bin/bash
    walk() {
    local -i i=0
    for src in "$1"/*; do
    if [[ -d $src ]]; then
    walk "$src"
    continue
    fi
    printf -v dest '%s/%04d.jpg' "$1" "$(( ++i ))"
    mv "$src" "$dest"
    done
    [[ $1 ]] || exit 1
    walk "$1"

  • [SOLVED] Lenovo T530 UEFI Arch/Ubuntu Dual boot - Arch fails to boot.

    Hi All,
    I have installed Arch to my Lenovo T530 to dual boot with Ubuntu using UEFI and Grub.
    After installation, Arch is presented to me as an option when my laptop fires up. However, if I select it, the loader goes to a purple screen and then hangs.
    I have attached here the bootloader scripts for my Arch installation (not working), my Ubuntu installation (working) and the output from sudo lsblk -o name,mountpoint,label,size,uuid.
    Please let me know if there is more useful information I can provide. (I have output from Bootinfoscript available but it is quite extensive).
    I am hoping to find out if there is an easily fixable error in the booting scripts used by Grub. If not, I have seen the section on dual booting with Arch in the wiki. My worry is that if I resort to it, UEFI looks to be temperamental at best and I risk breaking my currently working Ubuntu installation.
    Thanks and regards,
    Simon
    Arch boot script (not working):
    setparams 'Arch (on /dev/sda4)'
    insmod part-gpt
    insmod ext2
    set root= 'hd0,gpt4'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 -\
    -hint-efi=hd0,gpt4 -hint-baremetal=ahci0,gpt4 729b5164-22c4-4c21-8212-\
    66038d60943e
    else
    search --no-floppy --fs-uuid --set=root 729b5164-22c4-4c21-821\
    2-66038d60943e
    fi
    linux /boot/vmlinuz root=UUID=ad4103fa-d940-47ca-8506-301d\
    8071d467 rw quiet
    initrd /boot/initramfs-linux.img
    Ubuntu boot script (working)
    setparams 'Ubuntu, with Linux 3.13.0-24-generic'
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part-gpt
    insmod ext2
    set root= 'hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd\
    0,gpt2 --hint-efi=hd0,gpt2 -hint-baremetal=ahci0,gpt2 542bf27c-0fd5-42\
    4a-b4d8-107f7cf97b75
    else
    search --no-floppy --fs-uuid --set=root 542bf27c-0fd5-\
    424a-b4d8-107f7cf97b75
    fi
    echo 'Loading Linux 3.13.0-24-generic ...'
    linux /boot/vmlinuz-3.13.0-24-generic root=UUID=5\
    42bf27c-0fd5-424a-b4d8-107f7cf97b75 ro quiet spash $vt_handoff
    echo 'Loading initial ramdisk ...'
    initrd /boot/initrd.img-3.13.0-24-generic
    Output from sudo lsblk -o name,mountpoint,label,size,uuid
    NAME MOUNTPOINT LABEL SIZE UUID
    sda 119.2G
    ├─sda1 /boot/efi BOOTLOADER 524M 9360-2939
    ├─sda2 / Linux_Ubuntu 34.6G 542bf27c-0fd5-424a-b4d8-107f7cf97b75
    ├─sda3 [SWAP] Swap 9.8G 7768ae01-6e37-450b-bf0c-d873e3fd06a1
    ├─sda4 Linux_Arch 32.7G 729b5164-22c4-4c21-8212-66038d60943e
    ├─sda5 /media/Data Data 33.2G 5a971a77-685b-43d5-a8e6-c7b407a4c2ff
    └─sda6 Misc_Data 8.5G b165990d-bd25-458f-b2d6-63fae28d0870
    sdb 1T
    └─sdb1 1024G a1ee2f60-007a-4292-982b-7d5f8375fc7e
    sr0 1024M
    Last edited by simon_sjw (2015-03-22 10:43:03)

    linux /boot/vmlinuz root=UUID=ad4103fa-d940-47ca-8506-301d8071d467 rw quiet
    Change the UUID here. Where did that come from?
    EDIT: curiously, if you DuckDuckGo search this exact UUID, it comes up a bunch of times and has caused people headaches before. If you fix that you should be okay. If anyone knows why this same exact UUID would incorrectly be created on multiple systems, I'd love to know. Seems like some kind of issue with dual/triple booting and OS-prober.
    2nd EDIT: this UUID is in the default in grub.cfg. For some reason, it sometimes won't be replaced by grub-mkconfig... Maybe the user didn't run grub-mkconfig, but edited the file him or herself? simon_sjw?
    Last edited by nullified (2015-03-22 03:12:36)

  • [SOLVED]Bash prompt colors different in console as opposed in terminal

    Hi
    EDIT: I have solved the problem by copying /etc/skel/.bash_profile to my home directory.
    Today i updated the system and the bash prompt is fine in my terminal (KDE Konsole or in Xterm) but not in consoles. For normal user (blue colors) i use this settings in the $HOME/.bashrc file:
    PS1='[\e[0;36m\u\e[0m@\e[0;36m\h\e[0m]─[\e[0;33m\w\e[0m]\n└─\$ '
    For root (red color) /root/.bashrc:
    PS1='[\e[1;31m\u\e[0m@\e[1;31m\h\e[0m]─[\e[0;33m\w\e[0m]\n└─\$ '
    Now, if i login in console as a normal user it doesn't display blue color but red as if i was root user. Like i said in xterm or KDE Konsole it looks just fine. The case is that consoles don't use my .bashrc file and use instead /etc/bash.bashrc file: Here is my /etc/bash.bashrc file:
    # /etc/bash.bashrc
    # If not running interactively, don't do anything
    [[ $- != *i* ]] && return
    #PS1='[\u@\h \W]\$ '
    PS1='[\e[1;31m\u\e[0m@\e[1;31m\h\e[0m]─[\e[0;33m\w\e[0m]\n└─\$ '
    PS2='> '
    PS3='> '
    PS4='+ '
    case ${TERM} in
    xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
    screen)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
    esac
    [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
    export EDITOR=/usr/bin/nano
    Here is my today's update:
    [2012-07-06 08:54] upgraded linux-api-headers (3.3.8-1 -> 3.4.4-1)
    [2012-07-06 08:54] warning: /etc/locale.gen installed as /etc/locale.gen.pacnew
    [2012-07-06 08:54] Generating locales...
    [2012-07-06 08:54] en_GB.UTF-8... done
    [2012-07-06 08:54] en_GB.ISO-8859-1... done
    [2012-07-06 08:54] Generation complete.
    [2012-07-06 08:54] upgraded glibc (2.15-12 -> 2.16.0-1)
    [2012-07-06 08:54] upgraded binutils (2.22-7 -> 2.22-8)
    [2012-07-06 08:54] upgraded dbus-core (1.6.0-5 -> 1.6.2-2)
    [2012-07-06 08:54] upgraded dbus (1.6.0-1 -> 1.6.2-1)
    [2012-07-06 08:54] upgraded device-mapper (2.02.96-2 -> 2.02.96-3)
    [2012-07-06 08:54] upgraded gcc-libs (4.7.1-3 -> 4.7.1-4)
    [2012-07-06 08:54] upgraded gcc (4.7.1-3 -> 4.7.1-4)
    [2012-07-06 08:54] upgraded grep (2.12-1 -> 2.13-1)
    [2012-07-06 08:54] upgraded initscripts (2012.06.3-1 -> 2012.06.3-2)
    [2012-07-06 08:54] upgraded libpurple (2.10.4-2 -> 2.10.5-1)
    [2012-07-06 08:54] upgraded libusb-compat (0.1.4-1 -> 0.1.4-2)
    [2012-07-06 08:54] upgraded lvm2 (2.02.96-2 -> 2.02.96-3)
    [2012-07-06 08:54] upgraded mpfr (3.1.0.p10-1 -> 3.1.1-1)
    Is it a problem in yesterday's pam upgrade? Yesterday i have moved /etc/pam.d/login.pacnew to /etc/pam.d/login. I didn't backup the old file. My bad. Weird thing is also this that today my KDE session crashed (for the first time) when i have used dd to burn image on my USB.
    Last edited by Shark (2012-07-06 08:40:31)

    Procyon wrote:What you want is [ -n "$SSH_CONNECTION" ] (variable is set/nonzero length) or the opposite [ -z "$SSH_CONNECTION" ] (variable is not set/zero length)
    Thanks-- that got it.  I was missing the quotes, so it was expanding at the spaces rather than interpreting the entire thing as a string.

  • Disk Utility: Different burn rates when burning DVDs

    Hi Folks,
    When I burn DVDs from a disk-image using Disk Utility it displays a message showing the maximum burn rate.
    Using the same image, same machine and same batch of DVDs the message displayed varies from a 2x to 8x burn rate.
    Any idea why ? Is it the burner, the utility, the DVD ... ???
    Thanks in advance
    Pat De Marco

    Hi Pat,
    Are you perhaps speaking of the variance over the breadth of a a single disc?
    They burn slower on the inner tracks than the outer tracks due to higher surface speed on the outer tracks at the same RPM.
    Burners are also made to adjust burning speed to match the capability of the Media... no two are identical, though higher end ones will be closer to each other.

  • How do I utilize multiple instances of firefox utilizing different credentials, and retain full functionality.

    Recently my company made some "in the name of security" changes. One of these was to give local IT two windows accounts, one for e-mail and day to day activities, and the other for when administrative privileged is required.
    I have been using Firefox for years with out problems. I have made the tweaks for auto authentication to the domain as well as few others and everything has been working fine. Problem I am having is that now with my second credentials I have to have multiple browsers open so that the internal sites that require my privileged account authenticate properly. i have successfully gotten both Firefox (29.0.1) and Firefox portable (29.0.1) to run with my other credentials. (Love that -no-remote switch) My problem is any time something requires a plug-in YouTube(flash) The Firefox session started with my secondary (privileged) credentials starts displaying unresponsive script errors. This is a huge headache as several of my companies internal websites require both my secondary credentials, but they require flash as well?

    The unresponsive script can be troubleshooted or prevented with this recommended add on mentioned in this knowledge base article [http://mzl.la/LOwPvg] However it is strange that when you access the youtube site the other windows that are authenticated seem to timeout? or do they just hang?
    One way to narrow this down is to check what script is running in the web console tool found in the web developer menu. The warning will normally tell you what script is running and should give a hint. Other questions have mentioned it was this script: [https://support.mozilla.org/en-US/questions/982169 questions/982169]
    You can also try the new Firefox player being developed to play instead: [http://mozilla.github.io/shumway/] It would replace the default Flash player Youtube uses.
    For further investigation if this still happens after trying shumway:
    # What are the credentials being authenticated with? Both are windows accounts, however when visiting websites each authenticated windows account are logged in at the same time, how?
    # Autoauthentication is implemented how?
    #Multiple browsers? Does each browser only have one of the two authenticated accounts logged in?
    Thank you for your posts!

  • Reports not returning records utilizing different currency type.

    Good morning,
    My company has numerous subsidiaries utlizing CRM On Demand. Although our defauct currency is USD, one of our operations enters opportuntiy data in Canadian dollars. Both currency types are active in the system but for some reason, the custom reports I have created are not returning records created by our Canadian company entering in CAD.
    There is probably a quick solution, but so far I have yet to find it! Thanks in advance for your feedback!
    Ryan

    yes...your report won't show data for canadian currency. even the admins won't be able to see it.
    try this fix instead:
    you will have to create a new field for currency in the opty page layout and change it to canadian dollar otherwise the currency would still appear as USD in the database.
    Then use this field in your reports.
    This should help. please let us know your feedback.

  • [Solved] bash diff util for directories needed

    Hi there
    I have two dirs with nearly the same content.
    Lets call them A and B.
    A contains some files which are not in B, I want to a list of these files. I do not care about files existing in both dirs which have not the same content. It's only about the files existing or not.
    My first thought was something like that
    $ find A > contentOfA
    $ find B > contentOfB
    $ diff contentOfA contentOfB
    but here I also get files which are in B but not in A.
    Is there an easier way to do this?
    Regards,
    Keen
    Last edited by keen90 (2011-09-25 15:18:44)

    Use 'comm' instead of diff - 'man comm'.
    comm -23 contentOfA contentOfB
    should do.
    You can use diff like this
    [karol@black ~]$ tree
    ├── A
    │   ├── a
    │   ├── b
    │   ├── c
    │   └── d
    └── B
    ├── a
    ├── b
    ├── e
    └── f
    2 directories, 10 files
    [karol@black ~]$ diff A B
    Only in A: c
    Only in A: d
    Only in B: e
    Only in B: f
    Last edited by karol (2011-09-25 14:38:21)

  • Rename database command line utility

    hey,
    the DbDump, DbLoad, et.al. provide a lot of useful administrative functions, but for some reason database renaming does not seem to be among them (that i could see). just a request that a database rename utility be added in some future version.
    thanks,
    -james

    Hi James,
    Sorry for the late reply. It's true that we don't have a rename utility, nor remove or truncate. There are others one could imagine. We don't have plans to add more utilities right now, but we'll keep your request in mind.
    Thanks,
    Mark

  • Migrating Arch's initscripts to dash

    I recently "discovered" dash and how fast it is as compared to bash. FYI, dash is "a POSIX-compliant shell that is much smaller than bash". That being said, here are some simple benchmarks which compare the speed of bash and dash using a for loop (btw, I'm ran the tests below in bash since 'time' is a bash built-in):
    (test.sh w/ output redirection)
    for x in `seq 50000`; do
    echo "" > /dev/null
    done
    results for bash:
    $ time bash test.sh
    real    0m2.143s
    user    0m1.740s
    sys     0m0.413s
    $ time bash test.sh
    real    0m2.180s
    user    0m1.730s
    sys     0m0.450s
    $ time bash test.sh
    real    0m2.189s
    user    0m1.717s
    sys     0m0.460s
    ave: 2.171 seconds
    results for dash:
    $ time dash test.sh
    real    0m0.741s
    user    0m0.350s
    sys     0m0.403s
    $ time dash test.sh
    real    0m0.729s
    user    0m0.413s
    sys     0m0.327s
    $ time dash test.sh
    real    0m0.732s
    user    0m0.360s
    sys     0m0.373s
    ave: 0.734 seconds
    * In this test, dash is 2.96 times faster than bash!
    (test.sh w/o output redirection)
    for x in `seq 50000`; do
    echo -n ""
    done
    results for bash:
    $ time bash test.sh
    real    0m0.845s
    user    0m0.833s
    sys     0m0.010s
    $ time bash test.sh
    real    0m0.867s
    user    0m0.863s
    sys     0m0.007s
    $ time bash test.sh
    real    0m0.871s
    user    0m0.870s
    sys     0m0.003s
    ave: 0.861 seconds
    results for dash:
    $ time dash test.sh
    real    0m0.167s
    user    0m0.177s
    sys     0m0.003s
    $ time dash test.sh
    real    0m0.165s
    user    0m0.153s
    sys     0m0.020s
    $ time dash test.sh
    real    0m0.174s
    user    0m0.167s
    sys     0m0.013s
    ave: 0.169 seconds
    * In this test, dash is 5.10 times faster than bash! Astonishing!
    Now think about this... How much will Arch's boot speed increase if we use dash instead of bash for our initscripts? Of course, there are some caveats like some "bash-specific" or "bash-oriented" (non-POSIX-compliant) shell scripts that won't work in dash.
    I don't know if there are already existing efforts to make this happen so I'm bringing this up now. Tell me what you think.
    BTW, I also found a discussion about dash and bash in the ubuntu-devel mailing list.
    Last edited by djclue917 (2007-11-30 03:40:40)

    Out of curiosity (Okay I'm procrastinating doing something else) I did a quick port of /lib/udev/load-modules.sh from bash to dash. This is a known  bottleneck for boot time because it's called several times and is a bit slow.
    The big problem is that /etc/rc.conf uses arrays and dash doesn't support them. In the case of load-modules.sh we don't need true arrays but just space-separated values. In a complete move to dash, /etc/rc.conf would be updated to reflect this. But to not break things I just use eval/grep/tr to parse rc.conf. Which is probably not very efficient. (And could lead to bugs)
    I tested both with a module I actual use, and a blacklisted module. I saw speed improvements with dash in both cases. Because my testing was not very scientific, I'm posting my code instead of numbers:
    load-module.dash
    #! /bin/dash
    # Implement blacklisting for udev-loaded modules
    # Includes module checking
    # - Aaron Griffin & Tobias Powalowski for Archlinux
    # /etc/rc.conf is only parsable by bash. Fake it for dash.
    #. /etc/rc.conf
    eval `grep MOD /etc/rc.conf | tr '()' '""'`
    [ $# -ne 1 ] && exit 1
    if [ -f /proc/cmdline ]; then
    for cmd in $(cat /proc/cmdline); do
    case $cmd in
    *=*) eval $cmd ;;
    esac
    done
    fi
    # blacklist framebuffer modules
    for x in $(echo /lib/modules/$(uname -r)/kernel/drivers/video/*/*fb*); do
    BLACKLIST="$BLACKLIST $(basename $x .ko)"
    done
    for x in $(echo /lib/modules/$(uname -r)/kernel/drivers/video/*fb*); do
    BLACKLIST="$BLACKLIST $(basename $x .ko)"
    done
    # get the real names from modaliases
    i="$(/sbin/modprobe -i --show-depends $1 | sed "s#^insmod /lib.*/\(.*\)\.ko.*#\1#g" | sed 's|-|_|g')"
    # get blacklistet modules
    k="$(echo $BLACKLIST ${MOD_BLACKLIST} | sed 's|-|_|g')"
    j="$(echo $MODULES | sed 's|-|_|g')"
    #add disabled MODULES (!) to blacklist - much requested feature
    for m in ${j}; do
    [ "$m" != "${m#!}" ] && k="${k} ${m#!}"
    done
    # add disablemodules= from commandline to blacklist
    k="${k} $(echo ${disablemodules} | sed 's|-|_|g' | sed 's|,| |g')"
    # echo "k = [[ $k ]]" # Confirm that module parsing is working
    # echo "m = [[ $m ]]" # Confirm that module parsing is working
    if [ "$MOD_AUTOLOAD" = "yes" -o "$MOD_AUTOLOAD" = "YES" ] && [ "$load_modules" != "off" ]; then
    if [ "${k}" != "" ]; then
    for n in ${i}; do
    if echo ${k} | /bin/grep "\<$n\>" 2>&1 >/dev/null; then
    /usr/bin/logger -p info \
    "udev load-modules: $i is blacklisted"
    exit 1
    fi
    done
    fi
    /sbin/modprobe $1
    else
    /usr/bin/logger -p info \
    "udev load-modules: autoloading is disabled, not loading $i"
    fi
    # vim: set et ts=4:
    testdash
    #!/bin/dash
    [ $# -ne 2 ] && exit 1
    test_shell=$1
    test_mod=$2
    modprobe -r $test_mod
    for i in `seq 1 100`; do
    if [ $test_shell = "dash" ]; then
    /bin/dash ./load-modules.dash $test_mod
    elif [ $test_shell = "sh" ]; then
    /bin/sh ./load-modules.sh $test_mod
    elif [ $test_shell = "bash" ]; then
    /bin/bash ./load-modules.sh $test_mod
    elif [ $test_shell = "shdash" ]; then
    /bin/sh ./load-modules.dash $test_mod
    elif [ $test_shell = "bashdash" ]; then
    /bin/bash ./load-modules.dash $test_mod
    fi
    modprobe -r slhc
    done
    Invoke with
    time ./testdash dash slhc
    Or
    time ./testdash sh slhc
    You also can test /bin/bash versus /bin/sh (Which i assume is a symlink to bash, but bash handles it differently) or you can test bash or sh with my dash script (Which is slower due to the eval/grep/tr hack)
    Someone running bootchart before and after might be interesting.

Maybe you are looking for

  • [SOLVED] upgrade using Octopi system will not boot into DM

    I did a system upgrade using Octopi late last night. I use Enlightenment and Gnome. After the upgrade the desktop froze (E), so I switched to a vt and rebooted. That failed to work, so I forced power off using the power button and went to bed. The ne

  • How to display an XMl file in a webydynpro Application.

    Hi All, I am working with a webdynpro application where i have an xml file. when ever i run the webdynpro application it has to display that xml file in the browser instead of view. It would be appreciable if anyone give me some idea on how to start

  • No airport express "g" connection

    I updated my MB from 10.7.2 to 107.3  and now it is impossible to connect to my old airport express (even if my iphone and Ipad and my wife's PC correctly connect to WI FI). The MB correcty connects to others wi fi router as Netgear or 3Com. Sometime

  • Album track order changed on Zen Mi

    I have found when transferring whole albums onto the Micro via windows media, the order of the tracks is changed to alphabetical order on the Zen. This obviously renders some albums a nonsense when this happens. Have I unwittingly checked some option

  • Fix for audio after 10.5.8 upgrade?

    Anyone heard of a fix for poor audio (all alerts are mainly crackle and static now) after upgrading to OS X 10.5.8 ? Thanks.