Search Results

Search found 6936 results on 278 pages for 'shell scripting'.

Page 11/278 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Windows Shell Programming book suggestion

    - by Lijo
    Hi, I am a web developer using C#. I would like to experiment with Windows shell programming in C#. Many people suggests that using managed applications for shell program, is dangerous. (Creation of separate instances for each process versus in process shell. Also version dependency) Frankly speaking, I am totally new to shell. Is there a book available, that will treat these topics; both through managed code and unmanaged code (but mostly towards managed code)? It would be great if that book is concise , for beginner and giving theoretical background of the shell. Please suggest…. Thanks Lijo

    Read the article

  • How To Run A Shell Script Again And Again Having X Interval Of Time?

    - by Muhammad Hassan
    I have a shell script in my Ubuntu Server 14.04 LTS at ./ShellScript.sh. I setup /etc/rc.local to run the shell script after boot but before login using below code. Run this: sudo nano /etc/rc.local then add following and save. #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. #!/bin/bash ./ShellScript.sh exit 0 Now I want to run/execute this shell script again and again having 15min of time interval between every run after boot but before login. So Can I do it? Update 1:) When I run crontab -e then I got the following. Now What to do? no crontab for root - using an empty one Select an editor. To change later, run 'select-editor'. 1. /bin/ed 2. /bin/nano <---- easiest 3. /usr/bin/vim.basic 4. /usr/bin/vim.tiny Choose 1-4 [2]: After selecting 2, I got crontab: "/usr/bin/sensible-editor" exited with status 2 UPDATE 2:) Update ShellScript.sh like below... #!/bin/bash # Testing ShellScript... while true do echo "ShellScript Start Running..." ********************************** All My Shell Script Codes/Script/Commands ********************************** echo "ShellScript End Running..." exit 0 sleep 900 done Then Run this: sudo nano /etc/rc.local then add following and save. #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. sh ./ShellScript.sh & exit 0

    Read the article

  • Gnome-Shell panel disappeared - How to get it back?

    - by Arindom
    I am on Gnome-Shell and using Ubuntu 11.10. The problem is after a recent update and also after installing a few extensions, when I logged in to Gnome Shell, I can't find the top panel or AWN. Only the wallpaper is showing and then Conky is displaying. It also seems to me that for some reason the display effects are not working and that is why AWN is not showing. Need your help to get back the panel.

    Read the article

  • Is there any use for Bash scripting anymore?

    - by Precision
    I just finished my second year as a university CS student, so my "real-world" knowledge is lacking. I learned Java my first year, continued with Java and picked up C and simple Bash scripting my second. This summer I'm trying to learn Perl (God help me). I've dabbled with Python a bit in the past. My question is, now that we have very readable, very writable scripting languages like Python, Ruby, Perl, etc, why does anyone write Bash scripts? Is there something I'm missing? I know my linux box has perl and python. Are they not ubiquitous enough? Is there really something that's easier to do in Bash than in some other hll?

    Read the article

  • Best Practice: Legitimate Cross-Site Scripting

    - by Ryan
    While cross-site scripting is generally regarded as negative, I've run into several situations where it's necessary. I was recently working within the confines of a very limiting content management system. I needed to include database code within the page, but the hosting server didn't have anything usable available. I set up a couple barebones scripts on my own server, originally thinking that I could use AJAX to import the contents of my scripts directly into the template of the CMS (thus retaining dynamic images, menu items, CSS, etc.). I was wrong. Due to the limitations of XMLHttpRequest objects, it's not possible to grab content from a different domain. So I thought "iFrame" - even though I'm not a fan of frames, I thought that I could create a frame that matched the width and height of the content, so that it would appear native. Again, I was blocked by cross-site scripting "protections." While I could indeed load a remote file into the iFrame, I couldn't execute JavaScript to modify its size on either the host page or inside the loaded page. In this particular scenario, I wasn't able to point a subdomain to my server. I also couldn't create a script on the CMS server that could proxy content from my server, so my last thought was to use a remote JavaScript. A remote JavaScript works. It breaks when the user has JavaScript disabled, which is a downside; but it works. The "problem" I was having with using a remote JavaScript was that I had to use the JS function document.write() to output any content. Any output that isn't JS causes script errors. In addition to using document.write() for every line, you also have to ensure that the content is escaped - or else you end up with more script errors. My solution was as follows: My script received a GET parameter ("page") and then looked for the file ({$page}.php), and read the contents into a variable. However, I had to use awkward buffering techniques in order to actually execute the included scripts (for things like database interaction) then strip the final content of all line break characters ("\n") followed by escaping all required characters. The end result is that my original script (which outputs JavaScript) accesses seemingly "standard" scripts on my server and converts their standard output to JavaScript for displaying within the CMS template. While this solution works, it seems like there may be a better way to accomplish the same thing. What is the best way to make cross-site scripting work specifically for the purpose of including content from a completely different domain?

    Read the article

  • Scripting.dictionary to c#

    - by naresh
    Facing one problem please help me.... We are product development company and our existing application is in ASP, I am trying to send scripting.dictionary object to c#'s com visible class. I am using the System.Collections.Generic class here is my code ASP: dim dictForm set dictForm=CreateObject("scripting.dictionary") dictForm("First") ="one" dictForm("Second") ="two" SET OBJMSGBOX = Server.CreateObject("DictionarySerializer.DictionarySerializer") call OBJMSGBOX.ConvertDictionary(dictForm) c#: [ComVisible(true)] public class DictionarySerializer : IXmlSerializable { Dictionary dict = new Dictionary(); public void ConvertDictionary(Dictionary dictionary) { this.dict = dictionary; } } I am getting error Invalid procedure call or argument: 'ConvertDictionary' Please tell me where I am going in wrong way.

    Read the article

  • Run shell script using fabric and piping script text to shell's stdin

    - by Peter Lyons
    Is there a way to execute a multi-line shell script by piping it to the remote shell's standard input in fabric? Or must I always write it to the remote filesystem, then run it, then delete it? I like sending to stdin as it avoids the temporary file. If there's no fabric API (and it seems like there is not based on my research), presumably I can just use the ssh module directly. Basically I wish fabric.api.run was not limited to a 1-line command that gets passed to the shell as a command line argument, but instead would take a full multi-line script and write it to the remote shell's standard input.

    Read the article

  • Scripting language to embed into a Java server application

    - by Alexey Kalmykov
    I want to make a business logic of server side Java application as a set of scripts. So I need from a scripting engine: Maximum Java interoperability (i.e. Spring framework) Script reloading and recompiling Easy DB access from scripting language Clear and simple syntax (some DSL capabilities would be nice to have), easy learning curve for non-hardcore developers Performance and stability I had some experience in the similar project with Rhino and it was pretty good. But I want to see if there is something better. Currently I'm looking into Groovy. JRuby and Jython are a bit more complex than I need for this task. Any other suggestion? What to take into consideration?

    Read the article

  • Generating Dynamic web pages without server side scripting

    - by Microkernel
    Hi guys, I am trying to control a media device which has lot of multimedia content that it can play using another device(remote control device) like an ipad connected to the LAN. (UPnP) I want the media device to be able to send the content listing to the remote device so that it will be rendered as a webpage on the remote controller. And actions on the webpages needs to be sent to the the device as commands to execute (like play, pause, next etc). The media device is an embedded device, hence can't have any server side scripting, all has to be done on the client side. I want the page rendered to be HTML5. So, is it possible to generate dynamic HTML5 pages using just client side scripting? Thanks a lot. I am an embedded systems developer hence clueless about the web designing stuff.

    Read the article

  • Protecting IP for scripting projects

    - by Francisco Garcia
    There are some tasks where the obvious language choice is with scripting languages: bash, Python, Ruby, Tcl... however I find it hard to protect a company IP once the product is delivered because the application is never compiled. The client will have complete access to every single line of code. Which one are the choices to protect a product IP when it is best implemented with scripting languages? (switching to a compiled language such as C++ should not be an option) I know that some interpreted languages can be compiled, but there are cases where the process can be inverted

    Read the article

  • Open an Emacs buffer when a command tries to open an editor in shell-mode

    - by Chris Conway
    I like to use Emacs' shell mode, but it has a few deficiencies. One of those is that it's not smart enough to open a new buffer when a shell command tries to invoke an editor. For example with the environment variable VISUAL set to vim I get the following from svn propedit: $ svn propedit svn:externals . "svn-prop.tmp" 2L, 149C[1;1H ~ [4;1H~ [5;1H~ [6;1H~ [7;1H~ ... (It may be hard to tell from the representation, but it's a horrible, ugly mess.) With VISUAL set to "emacs -nw", I get $ svn propedit svn:externals . emacs: Terminal type "dumb" is not powerful enough to run Emacs. It lacks the ability to position the cursor. If that is not the actual type of terminal you have, use the Bourne shell command `TERM=... export TERM' (C-shell: `setenv TERM ...') to specify the correct type. It may be necessary to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.svn: system('emacs -nw svn-prop.tmp') returned 256 (It works with VISUAL set to just emacs, but only from inside an Emacs X window, not inside a terminal session.) Is there a way to get shell mode to do the right thing here and open up a new buffer on behalf of the command line process?

    Read the article

  • How to add commands of windows to local shell of XShell 4

    - by dylanninin
    XShell is a very powerful tools to ssh remote computers such as Unix/Linux. And it has built some internal commands for you to run within your Windows. Xshell:\> help Internal Commands: new: Creates a new session. open: Opens a session or the session dialog box. edit: Opens the Session Property dialog box for a session. list: Lists information of all available sessions. 'ls' and 'dir' do the same. cd: Changes the current working directory. clear: Clears the screen/address/command history. help: Displays this help. '?' does the same. quit: Quits Local Shell. 'exit' does the same. ssh: Connects to a host using the SSH protocol. telnet: Connects to a host using the TELNET protocol. rlogin: Connects to a host using the RLOGIN protocol. sftp: Connects to a host to transfer files securely. ftp: Connects to a host to transfer files. External Commands: ipconfig: Configures TCP/IP network interfaces. ping: Sends ICMP ECHO_REQUEST packets to network hosts. tracert: Prints the route packets take to network host. netstat: Displays current protocol statistics and current TCP/IP network connections. nslookup: Resolves a hostname to IP address. For more information, type 'help command' for each command. ex) help telnet But these commands are limited, so how to add commands of windows to local shell of XShell 4

    Read the article

  • Optimize shell and awk script

    - by bryan
    I am using a combination of a shell script, awk script and a find command to perform multiple text replacements in hundreds of files. The files sizes vary between a few hundred bytes and 20 kbytes. I am looking for a way to speed up this script. I am using cygwin. The shell script - #!/bin/bash if [ $# = 0 ]; then echo "Argument expected" exit 1 fi while [ $# -ge 1 ] do if [ ! -f $1 ]; then echo "No such file as $1" exit 1 fi awk -f ~/scripts/parse.awk $1 > ${1}.$$ if [ $? != 0 ]; then echo "Something went wrong with the script" rm ${1}.$$ exit 1 fi mv ${1}.$$ $1 shift done The awk script (simplified) - #! /usr/bin/awk -f /HHH.Web/{ if ( index($0,"Email") == 0) { sub(/HHH.Web/,"HHH.Web.Email"); } printf("%s\r\n",$0); next; } The command line find . -type f | xargs ~/scripts/run_parser.sh

    Read the article

  • Shell replacement for kiosk environment with desktop icons

    - by tuesprem
    I have to deploy around 80 touch-screen terminals for my company. We're going to run several Windows applications on those terminals and they'll be operated by touch input only. I basically want those machines to run in a kiosk mode, so employees won't be able to launch any programs than the ones they're supposed to (also, this will hide the task bar/start menu, which will give it a much nicer, corporate look). There's usually one app that should automatically launch on startup and other apps that can be launched from the desktop. I've tried to accomplish this (under Windows 7 Pro) with a custom shell replacement. This removes the task bar/start menu like I described earlier. I used an AutoHotKey script for this, because it's easy to, for instance, define hotkeys so admins will still be able to launch stuff like Windows Explorer (okay, I know I could just launch it from the task manager [Ctrl+Shift+Esc] but I'm considering locking that as well). So far so good. Some problems though: No desktop icons. Needed to launch apps from the desktop. No wallpaper. Required for CI. Is there any way around this? I wouldn't mind using another shell replacement, as long as it's reasonably lightweight. I'd love to get the wallpaper and desktop icons to show with something like AutoHotKey though. Thanks!

    Read the article

  • I need to know the reasons why learning Linux Shell Scripting (BASH) benefits me as a PHP developer

    - by Ahmad Farouk
    I have been developing web sites/applications using the LAMP stack for almost 5 years. Currently I am interested to dig more into Linux OS, specifically BASH but from a web developer perspective, not from sys admin perspective. I am not intending to administrate Linux Servers. Only, I want to know, does learning shell scripting benefit me as a PHP developer? Does it make me a better, more skilled developer, or just its something irrelevant? Reasons, and examples are highly appreciated. Thanks in advance.

    Read the article

  • How do you run the previous command in emacs shell?

    - by Lidmith
    I am in terminal mode on Ubuntu, and I'm running emacs with 2 buffers open, one is a ruby file, and the other is a shell (opened by typing M-x shell ), and when I switch to the shell buffer, I want to run the same command that I ran before. I would normally just hit the up arrow in a terminal window, but in emacs, it simply puts the cursor up one line. Does anyone know of keystroke to run the previous shell command from within an emacs shell?

    Read the article

  • How can I enable Gnome Shell Extensions with Ubuntu 11.10?

    - by TheGeeko61
    I am having a problem similar to that asked (and solved) here: Can't enable GNOME Shell extensions. I have performed both of the "tweaks" explained in that solution (i.e., here and here); but that does not seem to help. My gnome-shell is version 3.2.1. When I run gnome-tweak-tool from a shell, I get the following output: CRITICAL: Unknown extension error CRITICAL: Unknown extension error CRITICAL: Unknown extension error CRITICAL: Unknown extension error CRITICAL: Unknown extension error CRITICAL: Unknown extension error CRITICAL: Unknown extension error (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed (gnome-tweak-tool:7823): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width = 0' failed Has anyone actually solved this besides to the references above? I have made the suggested modifications from those sites.

    Read the article

  • Shell extension for SharePoint libraries

    - by Toro
    Is there a shell extension for Windows Explorer that is optimized for SharePoint libraries. Expected features are: Displaying Check-in/check-out status (as an icon overlay or additional column) Context menu to allow check-in/check-out/undo check-out, etc. Displaying current document version number Displaying document version history

    Read the article

  • Launch only the command if the previous one worked inside SSH, SHELL

    - by Namari
    I've got a SHELL script which is using a pipe to separate my 2 commands: ssh -oBatchMode=yes user@hostname "mysql -u yop -pyop -c yop | echo test" The problem is even if my connection to mysql doesn't work, it send the echo test. I would like to forbid my script to send any command if the previous command doesn't work. I search with a if condition but it seems it not possible with it :( Does anyone have an idea ? Thanks, Namari

    Read the article

  • How can I invoke a function in bash shell script

    - by sufery
    !/bin/bash one_func(){ echo 'abcd' } echo $(one_func) echo one_func the end I just wonder the distinction calling the function between $(one_function) and one_function in bash shell script. When I set the variable "PS1" in ~/.bashrc, I can't invoke the function by one_func e: export PS1="\n[\e[31m]\$(one_func)" it work export PS1="\n[\e[31m]one_func" it doesn't work

    Read the article

  • "Abort" message on linux shell

    - by bksi
    hello i compile & run a C program in linux terminal (using gcc). the program recieves as an argument a text file, parses it and outputs to screen and/or another text file. for some reason. in some cases, when i run the program, i get "Abort" message on the shell, and i can't figure out why. does anyone have an idea why this happens? thanks

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >