Sponsored Content
Top Forums Shell Programming and Scripting SH script, variable built command fails, but works at command line Post 302701123 by Corona688 on Friday 14th of September 2012 05:56:18 PM
Old 09-14-2012
Keep in mind that having openssh installed isn't the same as being able to compile things that use openssh libraries.

You might need to install openssh-dev or something like that to get the headers and library files the compiler needs.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

script works on command line, not in cron job

Hey there, I'm a total newbie unix guy here and just picking this stuff up. Have a very small script I put together that works fine from the command line but not once I put it in a cron job. Searched and found this thread and am wondering it it has something to do with setting variables, though the... (7 Replies)
Discussion started by: JackTheTripper
7 Replies

2. Shell Programming and Scripting

Cron job fails, but works fine from command line

I have a very basic script that essentially sends a log file, via FTP, to a backup server. My cron entry to run this every night is: 55 23 * * * /usr/bin/archive_logs The script runs perfectly when executed manually, and actually worked via cron for about three weeks. However, it mysteriously... (3 Replies)
Discussion started by: cdunavent
3 Replies

3. Shell Programming and Scripting

Zgrep works at command line but not in script?

Hi all- I'm trying to search through some .gz log files to verify certain feeds have passed through our app. I have a small script that I wrote in hopes that I could automate the checking but haven't been able to get the zgrep to work. When I copy it to the command line directly it works... (2 Replies)
Discussion started by: Cailet
2 Replies

4. Shell Programming and Scripting

This code works in the command line but not in a shl script

When I run this code from the command line works spinel.middlebury.edu:/u02/sct/banner/bandev2/middlebury/shl:DEV2$ ls ef* eftseq.dat spinel.middlebury.edu:/u02/sct/banner/bandev2/middlebury/shl:DEV2$ file_seq=$( < eftseq.dat) ... (1 Reply)
Discussion started by: rechever
1 Replies

5. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

6. UNIX for Dummies Questions & Answers

Works on command line but not in script

Hey guys. Hopefully this is an easy one but having reference similar problems on the web I still can't fix it. I am doing a recursive find and replace from a script. Of course I could just run the damn thing from the command line but it's bugging me now and want to get it working. grep -rl... (4 Replies)
Discussion started by: anthonyjstewart
4 Replies

7. UNIX for Dummies Questions & Answers

Works on command line but not in script; vncserver on solaris 10

Hi guys. My first post, so be gentle... On my Solaris 10 machine vnc server is running. I need a command to extract most recent client session number (screen). So with: Code: bash-3.2# ps -ef | grep vnc | grep Xaut root 19805 19797 0 15:41:44 ? 0:01 Xvnc :4 -inetd -once... (5 Replies)
Discussion started by: cp6uja
5 Replies

8. Shell Programming and Scripting

Works on command line but not in script

OSX 10.9 I am building a script that evaluates the difference between 2 files. Here is a command that does not work transparently. Running this command in Terminal yields great results; however when I put that line in a .sh script, I get the errors shown below. Am I doing something silly? ... (1 Reply)
Discussion started by: sudo
1 Replies

9. Shell Programming and Scripting

Find command works on Linux but fails on Solaris.

Hi, I am looking for a generic find command that works on both Linux and Solaris. I have the below command that works fine on Linux but fails on solaris.find /web/config -type f '(' -name '*.txt' -or -name '*.xml' -name '*.pro' ')' Fails on SunOS mysolaris 5.10 Generic_150400-61 sun4v sparc... (1 Reply)
Discussion started by: mohtashims
1 Replies

10. Shell Programming and Scripting

Replace string works on command-line but fails when run from shell script

I wish to replace "\\n" with a single white space. The below does the job on command-line: $ echo '/fin/app/scripts\\n/fin/app/01/sql' | sed -e 's#\\\\n# #g'; /fin/app/scripts /fin/app/01/sql However, when i have the same code to a shell script it is not able to get me the same output:... (8 Replies)
Discussion started by: mohtashims
8 Replies
DH_CONFIG_MODEL_UPGRADE(1p)				User Contributed Perl Documentation			       DH_CONFIG_MODEL_UPGRADE(1p)

NAME
dh_config_model_upgrade - add Config::Model based configuration merge SYNOPSIS
dh_config_model_upgrade [ debhelper options ] [ --model_name xx ] [ --model_package xx [ --model_version yy ] ] [ --edit_option "..." ] [ -p pkg ] DESCRIPTION
dh_config_model_upgrade is experimental dh_config_model_upgrade is a debhelper that will modify the package script to perform configuration merge on package upgrade. This merge is based on config-edit from Config::Model. Model information can be specified by command options or a configuration file: "debian/foo.config-model" A Model must be either : o Delivered in the package in "debian/config-model/models/" directory o Provided by another package REQUIREMENTS
For this program to work, package maintainer must ensure that: o ensure that *.postinst and *.config have a #DEBHELPER# line (if these files exist) o ensure that control file has a dependency on ${misc:Depends} OPTIONS
--model_name XX Specifies the model name (a la "Config::Model") that will be used to perform the upgrade. Without this information, "dh_config_model_upgrade" will do nothing. (shortcut "--mn") --model_for "xx yy" Specifies the package to act upon. Without this option, "dh_config_model_upgrade" will do nothing. To specify several packages, list the packages between quotes. (shortcut "--mf") --model_package XX Specifies the debian package that provide the model specified bu "-model_name". (shortcut "--mp") --model_version YY Specifies the minimal version of the package that provides the model. (shortcut "--mv") --edit_option "..." Specify a list of options or command that will be passed verbatim to config-edit during upgrade. Be sure to use quotes. -p debhelper option to specify which package(s) to act on. Usage "dh_config_model_upgrade" can be used with only command line options. For instance dh_config_model_upgrade --model_name Sshd -p openssh-server --model_package lib-config-model-openssh-perl --model_version 1.206 Alternatively, you can specify relevant information in configuration files. For instance: $ cat debian/openssh-server.config-model model_name: Sshd model_package: lib-config-model-openssh-perl model_version: 1.206 $ cat debian/openssh-client.config-model model_name: Ssh model_package: lib-config-model-openssh-perl model_version: 1.206 In this case, "dh_config_model_upgrade" will be invoked this way dh_config_model_upgrade If the model are delivered within the package, you will have to specify them in xx.install file. Here's a example based on "approx" package where the model file and the parser/writer are delivered in approx package. Debian dir contains: debian/config-model/Approx.pm debian/config-model/models/Approx.pl "debian/approx.install" contains: debian/config-model/Approx.pm usr/share/perl5/Config/Model debian/config-model/models/Approx.pl usr/share/perl5/Config/Model/models dh_config_model_upgrade is invoked as : dh_config_model_upgrade -model_name Approx debian files setup "dh_config_model_upgrade" will work if: o "control" file contains a "S{misc:Depends}" variable in "Depends" line o "rules" contains a "#DEBHELPER#" line to insert generated postinst snippet EXAMPLES
"dh_config_model_upgrade" can be called in the rules file via the dh command (no options are possible, you will have to specify "debian/*.config_model" files): %: dh --with config_model Or directly at the start of the build with build: dh_config_model_upgrade -model_name FooBar Here's an example to avoid using Augeas when upgrading build: dh_config_model_upgrade -model_name Sshd -edit_option "-backend custom" CAVEATS
Using options with a single dash (e.g. "-model_name" instead of "--model_name") will lead to ""Unknown option"" errors. ENVIRONMENT
This program will exit(0) if "DH_NO_ACT" is set or if "DEB_BUILD_OPTIONS" contains "noconfigmodel". SEE ALSO
debhelper This program is an addendum to debhelper (part of libconfig-model-perl). AUTHOR
Dominique Dumont <dod@debian.org> perl v5.14.2 2012-11-09 DH_CONFIG_MODEL_UPGRADE(1p)
All times are GMT -4. The time now is 08:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy