Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Running Command Line with $$a

    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Description:
    I need to run the following from the Unix command line:

    csh -f $aleph_proc/p_manage_21 "ABC01,input2.txt,output2,N,,650,,,$$aAnimal films.,Y,,,,,,,,,,,,,,,,N,,BATCH,"

    But when I look at the Batch Log via GUI, I saw that the system automatically converts the "$$a" in the string above to "13326a".

    How can I alter the command line so that the system won't change "$$a" in the string above to "13326a"?

    SKB# 16384-1683 says that it is possible to replace comma in the headings with "\%2C" so that the command line won't take it as a delimiter. So my guess is that there must be some escape character to overcome the constraint caused by $$.

    Running it with simple escape slashes (escape character) gets the response: "Variable name must contain alphanumeric characters." and it doesn't run command:
    #csh -f $aleph_proc/p_manage_21 "NPL01,input2.txt,output2,N,,650,,,\$\$aAnimal films.,Y,,,,,,,,,,,,,,,,N,,MASTER,"
    Variable name must contain alphanumeric characters.

    Resolution:
    There are multiple solutions. Part of the problem in this case is the space in the search term ("Animal films")

    1. Replace the $ character with \%24.
    #csh -f $aleph_proc/p_manage_21 "ABC01,input2.txt,output2,Y,,650,,,\%24\%24aAnimal films.,Y,,,,,,,,,,,,,,,,N,,BATCH,"
    (The double quotes before and after the parameters overcome the space issue.)
    ASCII code for "$" = 24.

    2. Single apostrophes instead of double quotes?
    csh -f $aleph_proc/p_manage_21 'NPL01,input2.txt,output2,N,,650,,,$$aAnimal films.,Y,,,,,,,,,,,,,,,,N,,BATCH,'

    3. You can also set up your edits in the parameter file, and run manage_21 from the command line calling the parameter file rather than explicitly putting the parameters into the command string. Doing it this way also eliminates the need to escape characters.
    csh -f $aleph_proc/p_manage_21 NPL01,input2.txt,output2,N,global-0183,,,,,,,,,,,,,,,,,,,,,N,,BATCH,
    You can see/edit the parameter file (in the above example global-0183) in $data_files/
    I often run a job from the client to get the parameter file setup, then edit it to use for other runs.

    4. Use a ^ character in place of the space so that quotes are unnecessary. Without quotes, the \ before the dollar sign works:
    csh -f p_manage_21 ABC01,newb_$OYM'eu',newb_$OYM'euc',Y,,,,,,N,,,,,,,,,943,6,,\$\$\aEuropean^Union,,,,N,,MASTERH,

    p-manage-21


    • Article last edited: 10/8/2013