Questions tagged [shell-scripting]

Programming in an Interpreted language executed by a running Shell

Generic programming in an Interpreted language (as opposed to compiled) executed by a running Shell. Sometimes referred to as "Glue Code" due to the practice of managing the execution and output of one or more compiled binaries and passing said output to another series of commands.

621 questions
1
vote
5 answers

linux how to tell the process for a script?

I ran a script postData.sh, but when I do "ps -ef", I don't see the script in the list of programs running but I do see extra -bash processes running. How do I determine the pid so I can kill the script as it is in the background right…
Dean Hiller
  • 911
  • 4
  • 15
  • 35
1
vote
1 answer

Nagios: bash is missing

I'm monitoring NTP server with nagios and nrpe, at the nagios server, when I get the following error: Service Status UNKNOWN Status information I am missing an important component : bash The plugin is:…
mvillar
  • 438
  • 1
  • 7
  • 19
1
vote
1 answer

Automatic provisioning of Windows server from a Linux client.

Our company builds a server-based C++ application, which can be installed by a Windows installer. I would like to be able to remotely log into a brand new Windows server, and install that C++ application, along with a test suite, and do it from a…
Jay Godse
  • 111
  • 1
  • 5
1
vote
1 answer

nice command - are other commands executed with script also niced?

A quick question about how nice works. Say if I have a script that runs in the crontab like so 0 4 * * * nice -n 19 /usr/local/admin/script.pl It is set to the lowest priority. This script will start other commands within it. Will these commands…
dgibbs
  • 661
  • 2
  • 11
  • 22
1
vote
2 answers

What is this specific shell script statement validating?

I'm not a good Shell Script expert. Can somebody help me to understand and explain the statement [ ! -z ${TRUE:-} ] && [ ${TRUE:-} == 'true' ] &&from the following snippet. What is this specific statement doing and/or being validated for? However,…
Gnanam
  • 1,459
  • 13
  • 26
  • 32
1
vote
1 answer

Can not seem to get expr substr to work

Can anyone tell me what I am doing wrong ? [ /jlr/sub/libexec/vmr-staging ] $ expr substr "onetwothree" 1 4 expr: syntax error I got the syntax from https://stackoverflow.com/a/220464/1150847
1
vote
1 answer

script reading from new descriptor in read

I have a script that asks some questions to the user and repeats the question until the user has answered something appropiate. This is done with an infinite loop that is break'd when an acceptable answer is read: while true do read -p "Which…
Carlos Campderrós
  • 773
  • 2
  • 6
  • 17
1
vote
2 answers

re-create new link and remove the old link on one command

according to ln manual page: man ln -f, --force remove existing destination files so as I understand if I want to re-create new link to some destination directory/file I can simply do ln -s -f some_directory new_link but…
Eytan
  • 611
  • 6
  • 13
  • 27
1
vote
4 answers

shell script in crontab, not all output being logged

I've got a simple shell script that runs a few LFTP commands and processes the files. When running straight from bash I get full output of those LFTP commands on screen. When running from crontab with the following... */5 * * * * /bin/bash…
batfastad
  • 456
  • 1
  • 11
  • 22
1
vote
1 answer

Mysql incremental backup and point in time recovery

I have a requirement for doing Incremental backup of MySQL database. For which I'm writing a shell script using the concept of binary logs. Now, the scenario is such that a full-backup will happen every alternate day and Incremental backup should be…
Rudra
  • 199
  • 2
  • 6
  • 11
1
vote
4 answers

Howto: command/tool ability check

When developing a shell script that should run on various unix/linux derivates, i sometimes have the problem that some tools have to be called in a different way compared to other systems. For example if the arguments are different. I wonder what's…
harald
  • 403
  • 2
  • 6
  • 19
1
vote
1 answer

ssh tunnel and rdesktop in one line

To access a windows machine remotely I have to tunnel through a ubuntu server of mine. To setup the tunnel I have ssh -l root -C -L 9999:windowsmachine:23389 myserver Then I have to open another console and run rdesktop -u user -password -f…
jdog
  • 121
  • 7
  • 29
1
vote
1 answer

escaping spaces in shell script

yesterday="2010-06-23 00:00:00" today="2010-06-24 00:00:00" mywhere="lastupdate>'$yesterday' and lastupdate<'$today'" mysqldump $param ticket --no-create-info --where=\"$mywhere\" The last line of above shell script would return something like…
shantanuo
  • 3,579
  • 8
  • 49
  • 66
1
vote
2 answers

Oracle Golden gate version using shell scrip

I am trying to grep the Oracle golden gate from a remote machine, But along with version it is giving some error details also, How do I resolve it ? user@serverhost:/dbei > echo /ggsci | ssh gger@payhlc203 | grep…
Arn
  • 13
  • 5
1
vote
5 answers

Solutions for scheduling cronjob

I have setup a list of cron, Some of the cron script takes a long time to run (like 1-5 hours, and they are increasing every day). I do not want to run two cron scripts at the same time, as I do not have the resources or need for it. I need to find…
Shamsul
  • 11
  • 1