07-10-2018
Welcome to the forum.
Please become accustomed to provide decent context info of your problem.
It is always helpful to carefully and detailedly phrase a request, and to support it with system info like OS and shell, related environment (variables, options), preferred tools, adequate (representative) sample input and desired output data and the logics connecting the two including your own attempts at a solution, and, if existent, system (error) messages verbatim, to avoid ambiguities and keep people from guessing.
Thanks for applying the required code tags, but don't (over)use formatting and colouring, leaving the result nearly unreadable.
Just guessing: the first code shown is regen_structs_proto1.sh, and the second is create_rpc_rs.sh? Would have been nice to have pointed out in the first place.
Your juggling with shells and "shebangs" is sort of inconsistent, use bash throughout, or use sh, consistently. That might also be the source of the error: sh doesn't provide the [[ "conditional command".
For your ultimate question: export a variable to make it accessible in subshells / scripts.
This User Gave Thanks to RudiC For This Post:
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there!
I'm trying to write a script that will capture output from a command and assign it to a variable.
Let's say, for example, I'd like to catch from inside the script whatever the following command outputs:
ls *.aaa
and put it into a variable "listoffiles".
What I tried was:
set... (3 Replies)
Discussion started by: machinogodzilla
3 Replies
2. Shell Programming and Scripting
Hello ,
i am on linux,
and im trying to figure out why my cp command cant copy one file.
I am trying to use variable in which i stored path to location where is file i wish to copy.
$ echo $ORA_ALERT_LOG
/u01/app/oracle/diag/rdbms/ring11/ring11/trace
$
$
$ pwd
/home/oracle
$ cp -p... (2 Replies)
Discussion started by: tonijel
2 Replies
3. Shell Programming and Scripting
Hello again :)
Am currently trying to write a function which will delete a record from a file.
The code currently looks as such:
function deleteRecord() {
clear
read -p "Please enter the ID of the record you wish to remove: " strID
... (2 Replies)
Discussion started by: U_C_Dispatj
2 Replies
4. Red Hat
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Discussion started by: cielle
6 Replies
5. Shell Programming and Scripting
Hi,
I have a problem with passing a echo output into a variable in bash
file='1990.tar'
NAME='echo $file | cut -d '.' -f1';
echo $NAME
the result is
echo $file | cut -d . -f1
however with this one,#!/bin/bash
file='1990.tar'
echo $file | cut -d '.' -f1
the result is what I... (2 Replies)
Discussion started by: 1988PF
2 Replies
6. UNIX for Beginners Questions & Answers
Hello All,
Hope you're doing well !
I am trying below command to be passed in a shell script, header_date_14 is a variable and $1 is the name of a file I intend to pass as a command line argument, however command line argument is not being accepted.
header_date_14=$(m_dump... (8 Replies)
Discussion started by: ektubbe
8 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
2. Relevant commands, code, scripts, algorithms:
#! /bin/ksh
v="ORG_ID"
... (2 Replies)
Discussion started by: sujitdas2104
2 Replies
8. Shell Programming and Scripting
Hi,
I have some 2000 names in a table like below.
Java
Oracle/SQL
ANSI SQL
SQL,DWH,DB
DB&Java
And by using for loop in my code i am able to get a single word but if there is any special character or space then it is considering as a next line.
I have to execute the below queries in... (10 Replies)
Discussion started by: Samah
10 Replies
9. Docker
Hello All,
I had recently learnt a bit of Docker(which provides containerization process).
Here are some of my learning points from it.
Let us start first with very basic question:
What is Docker:
Docker is a platform for sysadmins and developers to DEPLOY, DEVELOP and RUN applications ... (7 Replies)
Discussion started by: RavinderSingh13
7 Replies
LEARN ABOUT NETBSD
lintian-info
LINTIAN-INFO(1) User Contributed Perl Documentation LINTIAN-INFO(1)
NAME
lintian-info - give detailed information about Lintian's error tags
SYNOPSIS
lintian-info [log-file...]
lintian-info --tags tag ...
DESCRIPTION
The lintian-info command parses the output of the lintian command and gives verbose information about the listed Lintian error tags, parses
a Lintian override file and gives verbose information about the tags included, or (if given the -t or --tags option) explains a given tag
or tags.
If no log-file is specified on the command line, this command expects its input on stdin. Thus, the output of lintian can either be piped
through lintian-info or a log file produced by lintian can be processed with this command. (Note, though, that the lintian command has a
command line option -i to display the same results as lintian-info, so you will not normally need to pipe the output of lintian into this
command.)
OPTIONS
-a, --annotate
Read from standard input or any files specified on the command line and search the input for lines formatted like Lintian override
entries. For each one that was found, display verbose information about that tag.
-h, --help
Display usage information and exit.
--profile prof
Use the severities from the vendor profile prof when displaying tags. If the profile name does not contain a slash, the default
profile for than vendor is chosen.
If not specified, lintian-info loads the best profile for the current vendor.
Please Refer to the Lintian User Manual for the full documentation of profiles.
-t, --tags
Rather than treating them as log file names, treat any command-line options as tag names and display the descriptions of each tag.
EXIT STATUS
If -t or --tags was given and one or more of the tags specified were unknown, this command returns the exit code 1. Otherwise, it always
returns with exit code 0.
SEE ALSO
lintian(1)
AUTHORS
Niels Thykier <niels@thykier.net>
Richard Braakman <dark@xs4all.nl>
Christian Schwarz <schwarz@monet.m.isar.de>
perl v5.14.2 2013-02-16 LINTIAN-INFO(1)