Search Results

Search found 1931 results on 78 pages for 'sh'.

Page 6/78 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • "sh: /usr/sbin/xenstored: not found" - But it's there?

    - by Matt H
    What would cause running the file /usr/sbin/xenstored to print sh: /usr/sbin/xenstored: not found However, the file /usr/sbin/xenstored is there and is not a symbolic link. Actually I should be running this as root. That prints a similarly odd message. sudo: unable to execute /usr/sbin/xenstored: No such file or directory By the way, xenstored is not a script, it's an ELF executable. My guess is that it's because I haven't gotten all the dependent libraries installed. However, I would expect it to say something like this: ./xenstored: error while loading shared libraries: libxenctrl.so.4.0: cannot open shared object file: No such file or directory Which is true of running xenstored on a system that doesn't have all the required libraries. Why do I get "not found" vs the much more useful "cannot open shared object file"?

    Read the article

  • Cron job running successfully suddenly reports script is not found

    - by Ted B
    What might cause cron to suddenly report a file it is supposed to run is "not found," when the file hasn't been touched, and in fact, the entire system hasn't been touched since it last ran successfully? I have a cronjob schedule I define by doing sudo crontab -e In it, I have dozens of cron jobs that run successfully.. I do not have a PATH specified, and I use absolute paths to call all my scheduled scripts, setting the PATH in them as needed. I do not specify a SHELL in the crontab. All scripts identify the shell as their first line. Without me touching the system, a particular job defined in the middle of other jobs will suddenly stop running. To debug this, I added an output redirection to a log file. In that, the output clearly shows the output of the script successfully running time after time for weeks, and then suddenly the following appears: /bin/sh: /home/iupress/bin/sync-email_images: not found /bin/sh: /home/iupress/bin/sync-email_images: not found /bin/sh: /home/iupress/bin/sync-email_images: not found /bin/sh: /home/iupress/bin/sync-email_images: not found /bin/sh: /home/iupress/bin/sync-email_images: not found /bin/sh: /home/iupress/bin/sync-email_images: not found /bin/sh: /home/iupress/bin/sync-email_images: not found /bin/sh: /home/iupress/bin/sync-email_images: not found /bin/sh: /home/iupress/bin/sync-email_images: not found If I do the ls command, copying and pasting that exact path from the error message, it clearly reports the file is still there (no surprise). Yet the log continues to report that file is "not found" until I take action. I can run the script manually and it runs just fine. If I do sudo crontab -e and save the file, the job runs on the next scheduled time, putting its output in the log, no longer reporting the script is "not found". It seems to me the contents of the script trying to be run are irrelevant since cron doesn't even process the file because it is "not found". I have a job scheduled below the one that is encountering this problem that I know is continuing to run, because I have its output mailed to me. So I know cron is running and continues to run at least one other job, even after it suddenly reports this job's script is "not found". All my lines end with a newline. I had no periods in the crontab until I added the redirection to a log file. I have now added a PATH specification, but left the absolute paths in the jobs. Unfortunately, I have no idea if and when this problem will occur. It will likely be weeks from now. By the way, I am running a script to syncronize the clock, and I see the time is exactly what it should be.

    Read the article

  • "bin/sh: can't access tty; job control turned off” error when running shellcode"

    - by Nosrettap
    I'm writing shellcode to exploit a buffer overflow vulnerability on a server. To do so I have port binding shellcode that I send to the server and then I run (from a linux terminal) the command telnet serverAdress 4444 where 4444 is the port which I have opened up. The hope is that I will receive a shell back that I can use to execute commands. However, I always end up with the command bin/sh: can't access tty; job control turned off I can't change any of the server code, and I believe the shellcode is correct because I got it from this website (http://www.tsirogiannis.com/exploits-vulnerabilities-videos-papers-shellcode/linuxx86-port-binding-shellcode-xor-encoded-152-bytes/). From my research, it appears that this may have to do with the mode that my terminal is running in (something called interactive mode...or something like that). All computers involved are linux machines and the machine that I am on is running the latest version of Ubuntu. Any ideas what this job control error means and how I can fix it?

    Read the article

  • SH/BASH - Scan a log file until some text occurs, then exit. How??

    - by James
    Current working environment is OSX 10.4.11. My current script: #!/bin/sh tail -f log.txt | while read line do if echo $line | grep -q 'LOL CANDY'; then echo 'LOL MATCH FOUND' exit 0 fi done It works properly the first time, but on the second run and beyond it takes 2 occurrences of 'LOL CANDY' to appear before the script will exit, for whatever reason. And although I'm not sure it is specifically related, there is the problem of the "tail -f" staying open forever. Can someone please give me an example that will work without using tail -f? If you want you can give me a bash script, as OSX can handle sh, bash, and some other shells I think.

    Read the article

  • jrunscript as a cross platform scripting environment

    - by user12798506
    ?????????????????????????????????????????????????????????sh????????????UNIX???????????????????sh???????????????????????????????????????????Windows????????????????? sh??????????????find?grep?sed?awk???Windows??????????????????????????????????????????????????????????????????????????????????????????????Windows???Cygwin????????????sh??????Windows??????????????Cygwin????????????????????????????????????????????JDK?????jrunscript?????JavaScript???????????????????????1?????????jrunscript??????????????????? Windows???UNIX??????????????????????? find?grep?sed?awk?????????sh???????????????Windows Script Host??????? Java????????????? ??????????????????????????????????????????????????????????(?????????????????????????????????????????) ?????????????JDK 6??????????????????????????PC????????????????JDK 6?PC????????????????????????????????????JDK????????????????????????????????????????jrunscript?????????????????????????? ?????jrunscript????JavaScript?????????????????????????????????????????? 1) Windows???UNIX????????????????? ?????????????????????????????????????????JavaScript???mytool.js???????????????????????jrunscript???????????UNIX????sh???????Windows????bat????????????????????? mytool.sh (UNIX?): #!/bin/sh bindir=$(cd $(dirname $0) && pwd) case "`uname`" in CYGWIN*) bindir=`cygpath -w "$bindir"` ;; esac jrunscript "${bindir}/mytool.js" $* mytool.bat (Windows?): @echo off set bindir=%~dp0 jrunscript "%bindir%mytool.js" %* UNIX??sh????????Cygwin???????????????????????????????????????????js??????????????UNIX?Windows??????????????????????????????? 2) jrunscript??cat, cp, find?grep?????? jrunscript???UNIX?????????????????????????????????? jrunscript JavaScript built-in functions ????UNIX??sh?????????????????????UNIX?????????????????????????????????????????src??????????java????????????enum???????java?????????????????????????????????????????????? find('src', '.*.java', function(f) { grep('enum', f); }); ???????UNIX?????????????????????????????????????????????????????????????????????????????????????????cp(from, to)??????????????????????????????????????????UNIX??????????? $ cp -r src/* tmp/ ?????????????????????????????????????????find()???????cp -r????????·?????????????????????? function cpr(fromdir, todir, pattern) { if (pattern == undefined) { pattern = ".*"; } var frdir = pathToFile(fromdir).getCanonicalPath(); find(fromdir, pattern, function(f) { // relative dir of file f from 'fromdir'. var relative = f.getParentFile().getCanonicalPath().substring(frdir.length() + 1); var dstdir = pathToFile(todir + "/" + relative); if (!dstdir.exists()) { // Create the destination dir for file f. mkdirs(dstdir); } // Copy file f to 'dstdir'. cp(f, dstdir + "/" + f.getName()); }); } java?????I/O?API??Windows?????????????"/"??????????????????????????????UNIX?Windows?????????????? ????????????exec(cmd)?????????jar???????????????????????????????????????????? $ jrunscript js> exec("jar xvf example.jar") META-INF/ ?????????????µ???B META-INF/MANIFEST.MF ???W?J???????µ???B com/ ?????????????µ???B com/example/ ?????????????µ???B com/example/Bar.class ???W?J???????µ???B com/example/dummy/ ?????????????µ???B com/example/dummy/dummy.txt ?????o???????µ???B com/example/dummy.properties ?????o???????µ???B com/example/Foo.class ???W?J???????µ???B ???exec()?????????????????????????????????????????????????????????????????Windows????????????I/O??????????????????????????????????BAT????????? errmsg.bat: for /L %%i in (1,1,50) do echo "Error Message count = %%i" 1&2 jrunscript??exec()???????????????18??????????????????????????????????? C:\tmp>jrunscript -e "exec('errmsg.bat')" C:\tmp>for /L %i in (1 1 100) do echo "Error Message count = %i" 1>&2 C:\tmp>echo "Error Message count = 1" 1>&2 : C:\tmp>echo "Error Message count = 18" 1>&2 ? ??? ???????????exec()?????????????????????????????????????????????????????????????????DataInputStream???????????????????????? $ jrunscript js this["exec"].toString() function exec(cmd) { var process = java.lang.Runtime.getRuntime().exec(cmd); var inp = new DataInputStream(process.getInputStream()); var line = null; while ((line = inp.readLine()) != null) { println(line); } process.waitFor(); $exit = process.exitValue(); } ?????????????????????????????????????????????????????exec()???????????????exec()?????????????????????????????exec()??????? function exec(cmd) { var process = java.lang.Runtime.getRuntime().exec(cmd); var stdworker = new java.lang.Runnable( {run: function() { cat(process.getInputStream()); }}); var errworker = new java.lang.Runnable( {run: function() { cat(process.getErrorStream()); }}); new java.lang.Thread(stdworker).start(); new java.lang.Thread(errworker).start(); return proc.waitFor(); } ???????????????????cat()???????????cat()?InputStreamReader?????????????????????????????????????????????????? 3) JavaScript???????????????? JavaScript?Java???????????????????????JavaScript????????????Ruby?Groovy?Scala???????????????????????????????????????????????10MB?????????????????????????????????????JavaScript????????????????????KB?????????????MB?JAR??????????????????????????JRE?JDK?????????????????????????????????????????

    Read the article

  • ways to execute python

    - by lakshmipathi
    So far to execute a python program , I'm using python file.py I want to run the python script simply using file name ,like file.py similar to shell scripts like sh file.sh chmod +x file.sh ./file.sh or move file.sh to bin and then run file.sh

    Read the article

  • Can't start a service (sudo) remotely from script and keep it running

    - by Greg Bernhardt
    I have a service (tomcat) that needs sudo to be started. I made a simple script on the remote server in /root/bin/test.sh #!/bin/sh sudo service tomcat start read (The script needs to do other stuff too, just pared down for simplicity). When I run a it directly on the remote server, tomcat starts and continues running on the server after I disconnect. When I run it remotely, the process starts, (I can see it when paused for the "read"), but once the script ends, it's gone. (while paused for the read, run this command locally) ps -ef | grep tomcat I've tried various combinations of nohup, screen, and & on the commands both on the local machine and in the remote machine's test.sh script, but I can't seem to get it working. ssh -t [email protected] "/root/bin/test.sh" ssh -t [email protected] "nohup /root/bin/test.sh" ssh -t [email protected] "nohup /root/bin/test.sh &" ssh -t [email protected] "screen /root/bin/test.sh &"

    Read the article

  • URL rewrite and domain frame

    - by Dennis
    I have registered the domain www.posti.sh at nic.sh. The website is on the server www.myskoob.com/postish. Unfortunately, nic.sh does not support frames, i.e. that the domain stays posti.sh as it forwards to www.myskoob.com/postish - so I thought about a URL rewrite on the server. Unfortunately I have no idea how rewriting works - I am thankful for explanations - but I would also like to ask whether this is generally possible. What I need is: The server needs to recognize that the folder postish is accessed Depending on the file that is opened, it needs to rewrite the url to www.posti.sh/<-according filename here- Also, the server needs to understand that a link to www.posti.sh/about.php links to www.myskoob.com/postish/about.php and likewise for other files - at the moment, when I type in posti.sh/about.php it redirects to http://www.myskoob.com/postishabout.php, which does not exist All this should be possible irrespective of whether the url contains a "www" at the beginning or not A plus but not necessary would be that it does not display the .php extensions Would that generally be possible? If not, what would be the alternatives? If anyone knows how to do it, any code and/or way to do it would be much appreciated!

    Read the article

  • Process not Listed by PS or in /proc/

    - by Hammer Bro.
    I'm trying to figure out how to operate a rather large Java program, 'prog'. If I go to its /bin/ dir and configure its setenv.sh and prog.sh to use local directories and my current user account. Then I try to run it via "./prog.sh start". Here are all the relevant bits of prog.sh: USER=(my current account) _CMD="/opt/jdk/bin/java -server -Xmx768m -classpath "${CLASSPATH}" -jar "${DIR}/prog.jar"" case "${ACTION}" in start) nohup su ${USER} -c "exec ${_CMD} >>${_LOGFILE} 2>&1" >/dev/null & echo $! >${_PID} echo "Prog running. PID="`cat ${_PID}` ;; stop) PID=`cat ${_PID} 2>/dev/null` echo "Shutting down prog: ${PID} kill -QUIT ${PID} 2>/dev/null kill ${PID} 2>/dev/null kill -KILL ${PID} 2>/dev/null rm -f ${_PID} echo "STOPPED `date`" >>${_LOGFILE} ;; When I actually do ./prog.sh start, it starts. But I can't find it at all on the process list. Nor can I kill it manually, using the same command the shell script uses. But I can tell it's running, because if I do ./prog.sh stop, it stops (and some temporary files elsewhere clean themselves out). ./prog.sh start Prog running. PID=1234 ps eaux | grep 1234 ps eaux | grep -i prog.jar ps eaux >> pslist.txt (It's not there either by PID or any clear name I can find: prog, java or jar.) cd /proc/1234/ -bash: cd: /proc/1234/: No such file or directory kill -QUIT 1234 kill 1234 kill -KILL 1234 -bash: kill: (1234) - No such process ./prog.sh stop Shutting down prog: 1234 As far as I can tell, the process is running yet not in any way listed by the system. I can't find it in ps or /proc/, nor can I kill it. But the shell script can still stop it properly. So my question is, how can something like this happen? Is the process supremely hidden, actually unlisted, or am I just missing it in some fashion? I'm trying to figure out what makes this program tick, and I can barely prove that it's ticking! Edit: ps eu | grep prog.sh (after having restarted; so random PID) 50038 19381 0.0 0.0 4412 632 pts/3 S+ 16:09 0:00 grep prog.sh HOSTNAME=machine.server.com TERM=vt100 SHELL=/bin/bash HISTSIZE=1000 SSH_CLIENT=::[STUFF] 1754 22 CVSROOT=:[DIR] SSH_TTY=/dev/pts/3 ANT_HOME=/opt/apache-ant-1.7.1 USER=[USER] LS_COLORS=[COLORS] SSH_AUTH_SOCK=[DIR] KDEDIR=/usr MAIL=[DIR] PATH=[DIRS] INPUTRC=/etc/inputrc PWD=[PWD] JAVA_HOME=/opt/jdk1.6.0_21 LANG=en_US.UTF-8 SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass M2_HOME=/opt/apache-maven-2.2.1 SHLVL=1 HOME=[~] LOGNAME=[USER] SSH_CONNECTION=::[STUFF] LESSOPEN=|/usr/bin/lesspipe.sh %s G_BROKEN_FILENAMES=1 _=/bin/grep OLDPWD=[DIR] I just realized that the stop) part of prog.sh isn't actually a guarantee that the process it claims to be stopping is running -- it just tries to kill the PID and suppresses all output then deletes the temporary file and manually inserts STOPPED into the log file. So I'm no longer so certain that the process is always running when I ps for it, although the code sample above indicates that it at least runs erratically. I'll continue looking into this undocumented behemoth when I return to work tomorrow.

    Read the article

  • export command within shell script

    - by shantanuo
    When I use export command at command prompt, it works as expected. But it does not work from shell script. [root@server shantanu]# export myip=10 [root@server shantanu]# echo $myip 10 [root@server shantanu]# vi myip.sh #!/bin/sh export myipadd=10 [root@server shantanu]# sh -xv myip.sh #!/bin/sh export myipadd=10 + export myipadd=10 + myipadd=10 [root@server shantanu]# echo $myipadd I want to make the variable available to the same script next time when it runs. In other words I am looking for some way to memorize the variable value.

    Read the article

  • How to execute home directory shell script file in php

    - by vvr
    How to execute /home/scripts/test.sh file in php Previously i have placed 'test.sh' file in the /usr/bin and calling in my php file like this exec('test.sh ' . escapeshellarg($testString)); But for security reasons i moved .sh file to /home/scripts directory and in my php i am calling like this exec('/home/scripts/test.sh ' . escapeshellarg($testString)); But it is not working now. Please suggest me how to achieve this.

    Read the article

  • background process outputs to the console

    - by broiyan
    Suppose test.sh is a bash script that is empty or contains only exit 0. When the script is backgrounded, what is the significance of the 1 and 16320 printed to the console? b@sam:~/Documents/bashscripts$ ./test.sh & [1] 16320 b@sam:~/Documents/bashscripts$ [1]+ Done ./test.sh b@sam:~/Documents/bashscripts$ Then if user hits ENTER at the command prompt, as illustrated above, another line appears and it shows this [1]+ Done ./test.sh What is the significance of the 1 digit and the + symbol?

    Read the article

  • What is ltmain.sh, and why does automake say it is missing? What is a good auto (make/conf/etc) gene

    - by gersh
    I just want to develop a C app in linux with the auto(make/conf/...) stuff automatically generated. I tried generating it with ede and anjuta, but it doesn't seem to generate Makefile.am. So, I tried running automake, and it says "ltmain.sh" isn't found. Is there some easy to generate the basic build files for linux C/C++ apps. What is the standard practice? Do most people write these files themselves?

    Read the article

  • Tool for making fn-x buttons work? Archlinux, handler.sh

    - by data_jepp
    This just seems like such a normal thing to work. I know that this works out of the box on Ubuntu. But not in Archlinux. I would like to think that there is a tool in existence that would use acpi_listen to create a step by step way to enable all of the fn buttons on the keyboard. Everything works expect fn-F10(mute), fn-F11(s-down), fn-F12(s-up). How can I make the sound buttons work?

    Read the article

  • SSH Interactive mode not working

    - by Ekin Koc
    I have a Debian based linux server running for a year or so, without any problems. A couple of days ago, ssh interactive mode stopped working for no reason. I mean, I can open an ssh connection just fine, the server greets me with shell but I just can't type anything. However, if I send commands like this: ssh [email protected] cat /var/log/messages, I get the response. I dug through several logs and found one message, which feels remotely relevant to the problem; sh kernel: [10222733.062511] ------------[ cut here ]------------ sh kernel: [10222733.062522] WARNING: at /build/buildd-linux-2.6_2.6.32-39-amd64-7yVIH2/linux-2.6-2.6.32/debian/build/source_amd64_none/drivers/char/tty_ldisc.c:738 tty_ldisc_reinit+0x46/0x7b() sh kernel: [10222733.062526] Hardware name: PowerEdge R210 II sh kernel: [10222733.062528] Modules linked in: ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables sha1_generic arc4 ecb ppp_mppe ppp_async crc_ccitt ppp_generic slhc loop snd_pcm snd_timer snd soundcore snd_page_alloc i2c_i801 i2c_core pcspkr evdev joydev dcdbas container button processor ext3 jbd mbcache sg sd_mod sr_mod crc_t10dif cdrom usb_storage usbhid hid mpt2sas ahci ehci_hcd libata scsi_transport_sas usbcore bnx2 nls_base scsi_mod fan thermal thermal_sys [last unloaded: scsi_wait_scan] sh kernel: [10222733.062568] Pid: 8662, comm: sshd Not tainted 2.6.32-5-amd64 #1 sh kernel: [10222733.062569] Call Trace: sh kernel: [10222733.062572] [<ffffffff811ff056>] ? tty_ldisc_reinit+0x46/0x7b sh kernel: [10222733.062574] [<ffffffff811ff056>] ? tty_ldisc_reinit+0x46/0x7b Is there any way to get back the sshd working in interactive mode? I tried restarting sshd but that is no help. And somehow, I can not reboot the server. Tried sending shutdown -r now and reboot but it refuses to go down. Should I go ahead and request a physical reboot?

    Read the article

  • Kernel panic when bringing up DRBD resource

    - by sc.
    I'm trying to set up two machines synchonizing with DRBD. The storage is setup as follows: PV - LVM - DRBD - CLVM - GFS2. DRBD is set up in dual primary mode. The first server is set up and running fine in primary mode. The drives on the first server have data on them. I've set up the second server and I'm trying to bring up the DRBD resources. I created all the base LVM's to match the first server. After initializing the resources with `` drbdadm create-md storage I'm bringing up the resources by issuing drbdadm up storage After issuing that command, I get a kernel panic and the server reboots in 30 seconds. Here's a screen capture. My configuration is as follows: OS: CentOS 6 uname -a Linux host.structuralcomponents.net 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux rpm -qa | grep drbd kmod-drbd84-8.4.1-2.el6.elrepo.x86_64 drbd84-utils-8.4.1-2.el6.elrepo.x86_64 cat /etc/drbd.d/global_common.conf global { usage-count yes; # minor-count dialog-refresh disable-ip-verification } common { handlers { pri-on-incon-degr "/usr/lib/drbd/notify-pri-on-incon-degr.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b /proc/sysrq-trigger ; reboot -f"; pri-lost-after-sb "/usr/lib/drbd/notify-pri-lost-after-sb.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b /proc/sysrq-trigger ; reboot -f"; local-io-error "/usr/lib/drbd/notify-io-error.sh; /usr/lib/drbd/notify-emergency-shutdown.sh; echo o /proc/sysrq-trigger ; halt -f"; # fence-peer "/usr/lib/drbd/crm-fence-peer.sh"; # split-brain "/usr/lib/drbd/notify-split-brain.sh root"; # out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root"; # before-resync-target "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k"; # after-resync-target /usr/lib/drbd/unsnapshot-resync-target-lvm.sh; } startup { # wfc-timeout degr-wfc-timeout outdated-wfc-timeout wait-after-sb become-primary-on both; wfc-timeout 30; degr-wfc-timeout 10; outdated-wfc-timeout 10; } options { # cpu-mask on-no-data-accessible } disk { # size max-bio-bvecs on-io-error fencing disk-barrier disk-flushes # disk-drain md-flushes resync-rate resync-after al-extents # c-plan-ahead c-delay-target c-fill-target c-max-rate # c-min-rate disk-timeout } net { # protocol timeout max-epoch-size max-buffers unplug-watermark # connect-int ping-int sndbuf-size rcvbuf-size ko-count # allow-two-primaries cram-hmac-alg shared-secret after-sb-0pri # after-sb-1pri after-sb-2pri always-asbp rr-conflict # ping-timeout data-integrity-alg tcp-cork on-congestion # congestion-fill congestion-extents csums-alg verify-alg # use-rle protocol C; allow-two-primaries yes; after-sb-0pri discard-zero-changes; after-sb-1pri discard-secondary; after-sb-2pri disconnect; } } cat /etc/drbd.d/storage.res resource storage { device /dev/drbd0; meta-disk internal; on host.structuralcomponents.net { address 10.10.1.120:7788; disk /dev/vg_storage/lv_storage; } on host2.structuralcomponents.net { address 10.10.1.121:7788; disk /dev/vg_storage/lv_storage; } /var/log/messages is not logging anything about the crash. I've been trying to find a cause of this but I've come up with nothing. Can anyone help me out? Thanks.

    Read the article

  • How to create scripts that create another scripts

    - by sfrj
    I am writing an script that needs to generate another script that will be used to shutdown an appserver... This is how my code looks like: echo "STEP 8: CREATE STOP SCRIPT" stopScriptContent="echo \"STOPING GLASSFISH PLEASE WAIT...\"\n cd glassfish4/bin\n chmod +x asadmin\n ./asadmin stop-domain\n #In order to work it is required that the original folder of glassfish don't contain already any #project, otherwise, there will be a conflict\n" ${stopScriptContent} > stop.sh chmod +x stop.sh But it is not being created correctly, this is how the output stop.sh looks like: "STOPING GLASSFISH PLEASE WAIT..."\n cd glassfish4/bin\n chmod +x asadmin\n ./asadmin stop-domain\n #In order to work it is required that the original folder of glassfish don't contain already any #project, otherwise, there will be a conflict\n As you see, lots of things are wrong: there is no echo command is taking the \n literaly so there is no new line My doubts are: What is the correct way of making an .sh script create another .sh script. What do you thing I am doing wrong?

    Read the article

  • Is there a difference between "." and "source" in bash, after all?

    - by ysap
    I was looking for the difference between the "." and "source" builtin commands and a few sources (e.g., in this discussion, and the bash manpage) suggest that these are just the same. However, following a problem with environment variables, I conducted a test. I created a file testenv.sh that contains: #!/bin/bash echo $MY_VAR In the command prompt, I performed the following: > chmod +x testenv.sh > MY_VAR=12345 > ./testenv.sh > source testenv.sh 12345 > MY_VAR=12345 ./testenv.sh 12345 [note that the 1st form returned an empty string] So, this little experiment suggests that there is a difference after all, where for the "source" command, the child environment inherits all the variables from the parent one, where for the "." it does not. Am I missing something, or is this is an undocumented/deprecated feature of bash? [ GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu) ]

    Read the article

  • Unable to install VMWare Workstation v8

    - by pst007x
    Installing VMware 8.0.2 64bit Ubuntu 12.04LTS 64bit BETA My Kernel version is: 3.2.0-20-generic pst007x@pst007x-Aspire-5741:~$ sudo sh VMware-Workstation-Full-8.0.2- 591240.x86_64.bundle Installs ok When I launch I am asked to install modules which are compiled and loaded into the running kernel. A window opens VMware Kernel Module Updater This fails on Virtual Network Device ERROR LOG. UPDATE: PATCH. When I try to add patch, following error: pst007x@pst007x-Aspire-5741:~$ sudo sh patch-modules_3.2.0.sh [sudo] password for pst007x: patch-modules_3.2.0.sh: 27: [: workstation8.0.2: unexpected operator patch-modules_3.2.0.sh: 28: [: workstation8.0.2: unexpected operator Sorry, this script is only for VMWare WorkStation 8.0.2 or VMWare Player 4.0.2. Exiting pst007x@pst007x-Aspire-5741:~$ I have fully un-installed, and re-installed. I am installing the correct version. Probably a problem with the patch. VMware installs perfectly on Ubuntu 11.10 This is how I uninstalled.

    Read the article

  • How to send a signal SIGINT from script to script ? BASH

    - by debugger
    I want to trap a signal send from Script-A.sh to Script-B.sh so in Script-A.sh i use the command (Send SIGINT to Script-B.sh) kill -2 $PID_Script-B.sh And in Script-B.sh i catch the signal and call function Clean trap 'Clean' 2 It does not work, instead the Script-B.sh is killed right away without performing the Clean !! What i notice also is that if i want to send SIGINT from terminal to any script that traps it, a ctrl-c will be catched correctly, but not if i specify the signal via the command kill -2 $pid_of_script Any idea about the difference between the two method to send the SIGINT (ctrl-c VS kill -2 $pid_of_script), and how i can send a SIGINT from a script to another ? Regards, Debugger

    Read the article

  • How to build the rpm package with SHA-256 checksum for files?

    - by larrycai
    In standard alone RHEL 6.4 rpm build environment, the rpm packages is generated with SHA-256 check sum, which is gotten by command rpm -qp --dump xxx.rpm [user@redhat64 abc]$ rpm -qp --dump package/rpm/abc-1.0.1-1.x86_64.rpm .. /opt/company/abc/abc/1.0.1-1/bin/start.sh 507 1398338016 d8820685b6446ee36a85cc1f7387d14537d6f8bf5ce4c5a4ccd2f70e9066c859 0100750 user abcc 0 .. While if it is build in docker environment (still RHEL6.4) the checksum is md5 UPDATE Use Ubuntu 14.04 as docker server, Redhat6.4 is the container inside [user@c1cbdf51d189 abc]$ rpm -qp --dump package/rpm/abc-1.0.1-1.x86_64.rpm .. /opt/company/abc/abc/1.0.1-1/bin/start.sh 507 1401952578 f229759944ba77c3c8ba2982c55bbe70 0100750 user abcc 0 .. If I checked the real file, the file is the same [user@c1cbdf51d189 1.0.1-1]$ sha256sum bin/start.sh d8820685b6446ee36a85cc1f7387d14537d6f8bf5ce4c5a4ccd2f70e9066c859 bin/start.sh [user@c1cbdf51d189 1.0.1-1]$ md5sum bin/start.sh f229759944ba77c3c8ba2982c55bbe70 bin/start.sh How I configure rpmbuild to let generated rpm file is SHA-256 based ?

    Read the article

  • why i failed to build rtorrent?

    - by hugemeow
    i am not root, so i have to build rtorrent from source and hope to install it in my home directory, but failed, why? [mirror@hugemeow rtorrent]$ ls AUTHORS autogen.sh ChangeLog configure.ac COPYING doc INSTALL Makefile.am NEWS rak README scripts src test [mirror@hugemeow rtorrent]$ ./autogen.sh aclocal... aclocal:configure.ac:7: warning: macro `AM_PATH_CPPUNIT' not found in library autoheader... libtoolize... using libtoolize automake... configure.ac: installing `./install-sh' configure.ac: installing `./missing' src/Makefile.am: installing `./depcomp' autoconf... configure.ac:7: error: possibly undefined macro: AM_PATH_CPPUNIT If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. though autoge failed, configure script is created. [mirror@hugemeow rtorrent]$ ls aclocal.m4 autogen.sh ChangeLog config.h.in configure COPYING doc install-sh Makefile.am missing rak scripts test AUTHORS autom4te.cache config.guess config.sub configure.ac depcomp INSTALL ltmain.sh Makefile.in NEWS README src run configure, and fail for syntax error near unexpected token `1.9.6', what's wrong? what i should do in order to build this rtorrent for my centos? [mirror@hugemeow rtorrent]$ ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes ./configure: line 2016: syntax error near unexpected token `1.9.6' ./configure: line 2016: `AM_PATH_CPPUNIT(1.9.6)' [mirror@hugemeow rtorrent]$ git branch * master [mirror@hugemeow rtorrent]$ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/c++11 remotes/origin/master [mirror@hugemeow rtorrent]$ git tag 0.9.0 0.9.1 [mirror@hugemeow rtorrent]$ git clean -dfx Removing Makefile.in Removing aclocal.m4 Removing autom4te.cache/ Removing config.guess Removing config.h.in Removing config.log Removing config.sub Removing configure Removing depcomp Removing doc/Makefile.in Removing install-sh Removing ltmain.sh Removing missing Removing src/Makefile.in Removing src/core/Makefile.in Removing src/display/Makefile.in Removing src/input/Makefile.in Removing src/rpc/Makefile.in Removing src/ui/Makefile.in Removing src/utils/Makefile.in Removing test/Makefile.in Edit 1: details about libtool and libtools [mirror@hugemeow rtorrent]$ libtoolize --version libtoolize (GNU libtool) 1.5.22 Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [mirror@hugemeow rtorrent]$ libtool --version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Read the article

  • Allow user to execute a shell script without seeing its contents?

    - by Autopulated
    I'd like to have an hg hook that sends email using a gmail account. Obviously I don't want anyone to be able read the email-sending script except me or root, since it has a password in, so here's what I've tried: -rwsr-xr-x 1 james james 58 Feb 18 12:05 incoming.email.sh -rwx--x--x 1 james james 262 Feb 18 12:04 send-incoming-email.sh where incoming.email.sh is the file executed as the hook: #! /bin/bash /path/to/send-incoming-email.sh However, when I try to run as another user I get the error: /bin/bash: /path/to/send-incoming-email.sh: Permission denied The send-incoming-email.sh file works fine when I run as myself. Is what I'm trying to do possible, or will setuid not propagate to commands executed from a shell script? System is Ubuntu 10.04.2 LTS.

    Read the article

  • Using powershell call native command-line app and capture STDERR

    - by crtracy
    I'm using a port of a cygwin tool on Windows which writes normal status messages to STRERR. This produces ugly output when run from PowerShell: PS> dos2unix.exe -n StartApp.sh StartApp_fixed.sh dos2unix.exe : dos2unix: converting file StartEC3.sh to file StartEC3_fixed.sh in UNIX format ... At line:1 char:13 + dos2unix.exe <<<< -n StartApp.sh StartApp_fixed.sh + CategoryInfo : NotSpecified: (dos2unix: conve...UNIX format ...:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError Is there a better way? P.S. I intend to post one solution I've found and compare it to answers from others.

    Read the article

  • Different behaviour of script locally and over ssh

    - by neorg
    I have a script on a server-A Script-A #!/bin/bash -l echo "script-A.sh" | change-environment.sh When I ssh onto server-A and execute it, it works fine. However, when I ssh user@server-A ./script-A.sh Script-A executes, but throws an undefined variable error in change-environment.sh. change-environment.sh runs in the c shell(I have no control over the script so the method I have used is about the only way I can use it), but everything else is in bash. Had found a similar question at I can run a script locally, but cannot do "ssh HOSTNAME /path/to/script.sh". However, there was no solution to the issue and it was a year old.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >