Search Results

Search found 6758 results on 271 pages for 'shell exec'.

Page 29/271 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • How can I save shell output to a variable in LaTeX?

    - by Frank
    I need to be able to execute a shell command through LaTeX [*] and have the resulting output available for use later on in the form of a LaTeX 'variable' (e.g., via a subsequent \newcommand command). If necessary a temporary file could be used to hold the output, although I would like to avoid this. I have been able to use \immediate\write18 to invoke a bash command before, but this was only used to write to a temporary file. [*] I realise that the -shell-escape flag must be set for this to be allowed

    Read the article

  • What is the most robust way of determining the current codepage from a shell script?

    - by rewbs
    Hi all, I'd like to determine the environment's current codepage at runtime from a Unix shell script. What's the most reliable way of doing this? I'm looking into parsing environment variable $LC_ALL, but it isn't always set to a useful value, and its format seems to vary (can be <locale, or <locale.<code page, or <locale.<code page@<modifier etc...). Is there a better way? I'm essentially after a shell equivalent of what I'd get if I called nl_langinfo(CODESET) from C.

    Read the article

  • Ant Exec environment var

    - by Mike
    I have a problem where I don't want to have to call a setEnv.sh file before i call my ant target that calls an exec task. Right now I have a way to save the environment variables in setenv.properties file in the key=value notation. The exec task for some reason does not see the variables that are set in the .properties file.... (I know i could use the tag but the setenv.properties is dynamically generated) setenv.properties: HELLO=XYZ part of my build.xml : <property file="setenv.properties"/> <target name="test" depends="setEnv"> <exec executable="/bin/ksh" newenvironment="false"> test.sh : echo ${HELLO} Any thoughts?

    Read the article

  • backup exec - backup to disk offline

    - by Adam
    Hi We are running backup exec 9.1 doing a backup to disk to portable hard disk drives. When we run the backup manually it works fine. But when the backup is setup to run in the evening on a schedule it does not run as the backup to disk folders goes offline and therefore has to be switched back on line. After we have done this the backup runs and completes fine. Any ideas? We have tried leaving the progam open and this makes no difference. Server is Windows 2003 SBS

    Read the article

  • Conditionally create symbolic link by filesize using find exec ubuntu 10.04

    - by jmlw
    I have an interesting problem. I'm trying to create symbolic links in a single folder, for all files in a directory which are larger than a specified size. For clarification, here is an example: /Files /Large_Files /LargeFile1_symlink /LargeFile2_symlink /Folder1 /file_a /file_b /Folder2 /LargeFile1 /Folder3 /LargeFile2 /file_c What I have so far to try to accomplish this is: find -size +102400 -exec ln -s $PWD/{} Large_Files/ \; However, this find produces ./LargeFile1 So my symlink command produces ln -s /Files/Folder2/./LargeFile1 Large_Files/ My question is, would it be possible to use the basename command to separate out only the filename so this command will work? Or does anybody have a suggestion on how to do this without writing a script, or give me an example on writing a script? I've never done scripting before, but I do know Java, but don't want to take the time to do all this in Java. Thank you for any help! Edit: adding tags

    Read the article

  • Backup Exec 2010 throwing error trying to restore Exchange mailbox

    - by Mindflux
    Error category : Resource ErrorsError : e000848c - Unable to attach to a resource. Make sure that all selected resources exist and are online, and then try again. If the server or resource no longer exists, remove it from the selection list. Edit the selection list properties, click the View Selection DFor additional information regarding this error refer to link V-79-57344-33932 I've got the Exchange agent loaded on the Exchange server. Through talking with some other folks I've added the Exchange Management Console to the Media(Backup) server. None of this has helped. I can back up Exchange all day long, however I cannot restore from it. I've followed the link given (V-79-57344-33923) which goes here and none of that has helped either. Server is running: Win Server 2008 w/ SP2 (64 bit) Backup Exec 2010 I am backing up to a Tandberg T24 tape library.

    Read the article

  • arcserve vs backup exec vray

    - by Luigi
    I have to buy one backup software to backup a vmware environment with the following server/applications: mixed microsoft windows 2003/2008/2012 server standard environment sql server 2005/2008 mixed linux centos/ubuntu servers postgresql sap environment exchange 2007 linux fileservers windows fileservers active directory random applications/sqlserver/fileserver on workstations xp/7/8 my hardware is: 5 blades on ibm bladecenter, various san, lto4 on 4gbit fiber channel connected to a windows2003 blade where I will install the backup software (backupexec or arcserve). What are your advice and comments over backupexec vray or arcserve choice ? I know that arcserve have a lower price. I used backup exec for some years but I found it pretty complicated. Thank you.

    Read the article

  • Using socat to exec php cli

    - by RoyHB
    There are multiple client programs that periodically connect to a port on my server and send a single line of text. When a connection to the port is made I need to start a PHP CLI script that processes the data. There may be many of the remote scripts running/connecting at more or less the same time so I think it would be best if socat forked a process for each connection to run the script. I've gotten socat to do most of what I need, using the command socat tcp-l:myport,fork exec:mypath/socatTest.php I can read the input on php://stdIn. All is good. The problem is that the process doesn't seem to fork, so if a second external program sends data while another is doing the same it gets a connection refused error. Where have I gone wrong?

    Read the article

  • Performance Comparison of Shell Scripts vs high level interpreted langs (C#/Java/etc.)

    - by dferraro
    Hi all, First - This is not meant to be a 'which is better, ignorant nonionic war thread'... But rather, I generally need help in making an architecture decision / argument to put forward to my boss. Skipping the details - I simply just would love to know and find the results of anyone who has done some performance comparisons of Shell vs [Insert General Purpose Programming Language (interpreted) here), such as C# or Java... Surprisingly, I have spent some time on Google on searching here to not find any of this data. Has anyone ever done these comparisons, in different use-cases; hitting a database like in a XYX # of loops doing different types of SQL (Oracle pref, but MSSQL would do) queries such as any of the CRUD ops - and also not hitting database and just regular 50k loop type comparison doing different types of calculations, and things of that nature? In particular - for right now, I need to a comparison of hitting an Oracle DB from a shell script vs, lets say C# (again, any GPPL thats interpreted would be fine, even the higher level ones like Python). But I also need to know about standard programming calculations / instructions/etc... Before you ask 'why not just write a quick test yourself? The answer is: I've been a Windows developer my whole life/career and have very limited knowledge of Shell scripting - not to mention *nix as a whole.... So asking the question on here from the more experienced guys would be grealty beneficial, not to mention time saving as we are in near perputual deadline crunch as it is ;). Thanks so much in advance,

    Read the article

  • How-to get the binding for a tab in the Dynamic Tab Shell Template

    - by Frank Nimphius
    The Dynamic Tab Shell template does expose a method on the Tab.java class that allows you to get access to the ADF binding container for a tab. At least in theory this works, because in practice this call always returns a null value (a bug is filed for this). To work around the problem, you can use code similar to the following to get the ADF binding for a specific tab DCBindingContainer currentBinding = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry(); DCBindingContainer templateBinding = (DCBindingContainer)currentBinding.get("ptb1"); DCBindingContainer tabBinding= (DCBindingContainer)templateBinding.get("r"+0);  In the code line above, the tabBinding variable will hold the binding reference to the first tab in the dynamic tab shell template. Note that the tab doesn't need to be visible for this (which has to do with how the template works).  "ptb1" is the template reference name in the PageDef file (Executable section) of the template consumer view. Check this string in your page before using this code. If it differs, change it also in the code above. "r0" is the binding reference of the first tab in the template. Te last tab is referenced by "r14".  

    Read the article

  • Gnome3 shell video corruption with ATI Radeon HD 4850 on 11.10 Oneiric

    - by AndyAtTheWebists
    I have a problem similar to what's been mentioned in a few other questions, namely: Ati incompatible with Gnome-shell? Gnome Shell Glitched Top Bar Ubuntu 11.10 I have read a number of other posts here and on other forums and have tried a bunch of different solutions. The Problem The problem manifests itself only in Gnome3. I have tried KDE, Unity and KFCE and all are fine. The graphics corruption is visible only on gnome panels (see images below). Everything works fine with the free ATI drivers, but they just lack power. The problem occurs with the proprietary ones from AMD/ATI. I have installed version 11.11 and 12.1 as per the instructions on wiki.cchtml.com/index.php/Ubuntu_Oneiric_Installation_Guide. I have the same exact problem in both cases. I have tried this on clean installs of Ubuntu 11.10 Oneiric Ocelot (x64 and x86) and on Linux Mint 12 (x64) with the same results. Also, it looks like after some time of not using it, the PC just freezes. Maybe an overheat? Will look into it. Things I've Tried I have tried the following fixes: Different versions of drivers from ATI including the latest - this worked for some, not for me. Installing Oneiric specific package generated from driver, as well as the default install Removed the Unity Global menu Disabled file manager handling desktop Disabled Compiz "detect refresh rate" Sync to VBlank in Compiz on and off Please help! This is the first time in 10 years that I've finally had the chance to switch my primary desktop to Linux (stopped doing .NET dev work), and this is really getting me down. This is what the problem looks like: And:

    Read the article

  • Beginning with shell scripting

    - by Kevin Wyman
    I am fresh into Ubuntu and one of my goals is shell scripting for personal (and maybe public) use. I'm a novice, though I do understand some of the basics (e.g. what a variable, string, loop, etc... is) but to get the most of scripting I need to learn in-depth. I figure the best way to do that is to jump right into scripting and ask questions only pertinent to the stage I am at in my attempted script. Scenario: I have edited my sudoers file to allow my non-root user to run sudo commands without being prompted for a password. Question: In vim, what would be the best code to use for a function that checks whether this condition is [true], If not, prompt the user if they want the script to edit and save the sudoers file to make this condition [true]? Layout - If condition is true, carry-on with rest of script. If condition is not true, the script silently edits/adds the line: %sudo ALL=(ALL:ALL) NOPASSWD: ALL in the sudoers file, saves and then continues on with the next part of the script. Any help with this would be greatly appreciated and assist me in my journey to writing shell scripts.

    Read the article

  • Calling Grep inside Java gives incorrect results when calling grep in shell gives correct results.

    - by futureelite7
    I've got a problem where calling grep from inside java gives incorrect results, as compared to the results from calling grep on the same file in the shell. My grep command (called both in Java and in bash. I escaped the slash in Java accordingly): /bin/grep -vP --regexp='^[0-9]+\t.*' /usr/local/apache-tomcat-6.0.18/work/Catalina/localhost/saccitic/237482319867147879_1271411421 The command is supposed to match and discard strings like these: 85295371616 Hi Mr Lee, please be informed that... My input file is this: 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 8~!95371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 852&^*&1616 Hi Mr Lee, please be informed that... 8529537Ax16 Hi Mr Lee, please be informed that... 85====ppq16 Hi Mr Lee, please be informed that... 85291234783 a3283784428349247233834728482984723333 85219299222 The commands works when I call it from inside bash (Results below): 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 8~!95371616 Hi Mr Lee, please be informed that... 852&^*&1616 Hi Mr Lee, please be informed that... 8529537Ax16 Hi Mr Lee, please be informed that... 85====ppq16 Hi Mr Lee, please be informed that... 85219299222 However, when I call grep again inside java, I get the entire file (Results below): 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 8~!95371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 852&^*&1616 Hi Mr Lee, please be informed that... 8529537Ax16 Hi Mr Lee, please be informed that... 85====ppq16 Hi Mr Lee, please be informed that... 85291234783 a3283784428349247233834728482984723333 85219299222 What could be the problem that will cause the grep called by Java to return incorrect results? I tried passing local information via the environment string array in runtime.exec, but nothing seems to change. Am I passing in the locale information incorrectly, or is the problem something else entirely? private String[] localeArray = new String[] { "LANG=", "LC_COLLATE=C", "LC_CTYPE=UTF-8", "LC_MESSAGES=C", "LC_MONETARY=C", "LC_NUMERIC=C", "LC_TIME=C", "LC_ALL=" };

    Read the article

  • Why does Ubuntu keep trying to connect to a WiFi network while plugged into an ethernet

    - by labarna
    My desk is situated at the edge of the range of a wireless signal which I use occasionally (when away from my desk) and is therefore saved in network manager. At my desk, however, I plug into the ethernet cable. While I'm working the computer is constantly trying to join the wireless network and usually failing this results in two annoying behaviors. 1: In gnome shell the network connect and disconnect notices keep popping up at the bottom of the screen and I have to click them to make them disappear (I assume it's been fixed in the next version of gnome). 2: (the worst!) Occasionally the wifi password dialog will pop up and ask for the password to this network (which is already saved). An additionally annoyance is that in gnome shell I'll get two copies of the dialog that I have to cancel, one is gnome shell themed (no window border etc...) and the other is just normal gnome themed. (Sometimes if I've been away from the computer for a while I will have multiple copies of this dialog up as its been trying to connect for a while resulting in at times 20 dialogs to cancel). Note, all the while I've been happily connected to the ethernet and have full network access. This is incredibly annoying and distracting, why doesn't ubuntu stop trying to connect to wifi if I'm on the ethernet (unless I want to broadcast my own network, but that's different)?

    Read the article

  • How to input data into user defined variables into MySql query

    - by user292791
    Simple Shell script echo "Enter 1 for month of March" echo "Enter 2 for month of April" echo "Enter 3 for month of May" read Month case "$Month" in 1) echo "enter establishment name" read a; mysql -u root -p $a < "March.sql";; 2) echo "enter establishment name" read b; mysql -u root -p $b < "April.sql";; 3) echo "enter establishment name" read c; mysql -u root -p $c < "May.sql";; esac done In this i have three other query files March.sql, April.sql, May.sql. i'm linking this in shell script . Example of .sql file: SELECT DISTINCT substr( a.case_no, 3, 2 ), b.case_type, b.type_name, a.case_no into outfile '/tmp/April.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' FROM Civil_t AS a, Case_type_t AS b, disposal_proc AS c WHERE substr( a.case_no, 3, 2 ) = b.case_type AND a.date_of_decision BETWEEN '2014-04-01' AND '2014-04-30' AND a.case_no = c.case_no AND a.court_no =1; I have to alter the .sql script every time. Is there any method to read the variables from shell script and use it in mysql. For example:- echo "enter date" read a #input date Now i have read a "date" and i want to use it in March.sql query in where clause. Is there is any method of using this variable in .sql query.

    Read the article

  • How to create a UDF that takes a query string and returns the query's resultset

    - by Martin
    I want to create a stored procedure that takes a simple SELECT statement and return the resultset as a CSV string. So the basic idea is get the sql statement from user input, run it using EXEC(@stmt) and convert the resultset to text using cursors. However, as SQLServer doesn't allow: select * from storedprocedure(@sqlStmt) UDF with EXEC(@sqlStmt) so I tried Insert into #tempTable EXEC(@sqlStmt), but this doesn't work (error = "invalid object name #tempTable"). I'm stuck. Could you please shed some light on this matter? Many thanks EDIT: Actually the output (e.g CSV string) is not important. The problem is I don't know how to assign a cursor to the resultset returned by EXEC. SP and UDF do not work with Exec() while creating a temp table before inserting values is impossible without knowing the input statement. I thought of OPENQUERY but it does not accept variables as its parameters.

    Read the article

  • How to restart Gnome Shell after a crash short of killing X?

    - by wintercorn
    How can I restart Gnome Shell after a crash? Alt+F2 and restart won't work as the prompt crashed with the shell. Since windows focus is gone along with the shell as well, I can't type gnome-shell --replace in a terminal, either. The Ctr+Alt+F1 command line can't open the X display. So I'm left with killing X, thus loosing all open applications. Is there a keyboard shortcut for restarting Gnome Shell?

    Read the article

  • read file in shell script

    - by moata_u
    how can i read file in shell script , then assign each line to an variable that i can use later ,,,(am thinking in way to load an default setting from file) i already try : process (){ } FILE='' read -p "Please enter name of default file : " FILE if [ ! -f $FILE ]; then echo "$FILE : does not exists " exit 1 elif [ ! -r $FILE ]; then echo "$FILE : can not read " fi exec 0<"$FILE" n=0 while read -r line do (assign each line to an variable) done

    Read the article

  • R: ESS shell.exec speed

    - by Musa
    I am using ESS in Windows XP. I have noticed that shell.exec is much slower with ESS than with RGui (the problem occurs when I try help(ls) for example, the help is displayed much faster in RGui, I tracked it down and it is due to shell.exec). Is there any reason for this? How can I fix it? My default browser is Firefox.

    Read the article

  • Redirecting exec output to a buffer or file

    - by devin
    I'm writing a C program where I fork(), exec(), and wait(). I'd like to take the output of the program I exec'ed to write it to file or buffer. For example, if I exec ls I want to write file1 file2 etc to buffer/file. I don't think there is a way to read stdout, so does that mean I have to use a pipe? Is there a general procedure here that I haven't been able to find?

    Read the article

  • Can i Use the value of a variable from within a ruby script inside ssh.exec()

    - by kamal
    If i have a # {} , like #{results}, in the snippet below: results = Array.new                                   f = open("/Users/kahmed/messages", "r")                                   f.each_line do |line|                                        results << "#{$.} #{line}" if line =~ /NFE/                                       put #{results}                                   end How can i use it in the following ssh.exec command Net::SSH.start( HOST, USER, :password = PASS ) do|ssh|                                   ssh.exec(#{results})

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >