I need to assign a variable within a variable in a sed command.
I tried doing the following in c shell.
set left = 1
set right = 2
set segment = qwerty
sed -n -e "/$segment{$left}/,/$segment{$right}/p" file.txt
what is wrong with this syntax? (3 Replies)
I am trying to write a simple script which will take a variable with sed to take a line out of a text and display it
#!/bin/sh
exec 3<list
while read list<&3
do
echo $list
sed -n '$list p'<list2
done
this does not work, yet when I replace the $list variable from the sed command and... (1 Reply)
I have got a file job_tree.lst , which contains 1 line as below
$ cat job_tree.lst
ABC_D_EQ_XXXXX_YYYY_PRD_UX 05/08/2009 05:47 05/08/2009 05:50 IN 13412850/0
I want to get a child job string 3 characters offset from the parent job string (i.e. ABC_D_EQ_XXXXX_YYYY_PRD_UX 05/08/2009... (4 Replies)
I can't believe I can't figure this out... given this code:
CARS_DATA_LIST=`cat /tmp/file1 | awk '{print $1}' `
FMSA_DATA_LIST=`cat /tmp/file2 | awk '{print $1}' `
The value of each of the above variables is:
CARS = a b c d e f g
FMSA = a b c q r s
I want to declare a third... (8 Replies)
Hello,
I have a problem combining two variables into one.
I did the following:
in my env variables i had set
PATH_DESTINATION_1=/root/path_one
PATH_DESTINATION_2=/root/path_two
#!/usr/bin/ksh
count=1
count_path=2
while
do (3 Replies)
hi guys,
The following command doesn't seem to work in my shell script:
tag=$(sed -n '/${line}/ s/.*\.*/\1/p' myfile.txt)
When i replace the ${line} with an actual value, it works fine.
So, how do i use the ${line} in this sed command?
Thanks in advance,
Zaff (2 Replies)
Hi all,
I want write a script to display 5rows at times from a input file.
my out like:
echo " display started"
r1
r2
r3
r4
r5
... Some action items...
again i need next 5 lines.
can you please advise. (2 Replies)
Hello, I am a new joiner to the forum, and have what i hope is a simple question, however I can't seem to find the answer so maybe it is not available within bash scripting.
I intend to use the below script to archive files from multiple directories at once by using a loop, and a variable (n)... (10 Replies)
Hi,
I heard a command that can collect all RHEL 5 log in a single compress file before I forget.
Does any body know...What the command is ?
Thanks. (4 Replies)
HELLO!!
I'm trying to pass a variable with in the 'sed' command (which would add some piece of code to file at a particular line). We can use
sed '{line-number}a\
alfjaljf\
aslfjsfsjafl\
adlfjaf\' file.txt
If file.txt is
Now, I would like to add the parameter 'lmn' after... (1 Reply)
Discussion started by: mjavalkar
1 Replies
LEARN ABOUT V7
devscripts.conf
DEVSCRIPTS.CONF(5) File Formats Manual DEVSCRIPTS.CONF(5)NAME
devscripts.conf - configuration file for the devscripts package
DESCRIPTION
The devscripts package provides a collection of scripts which may be of use to Debian developers and others wishing to build Debian pack-
ages. Many of these have options which can be configured on a system-wide and per-user basis.
Every script in the devscripts package which makes use of values from these configuration files describes the specific settings recognised
in its own manpage. (For a list of the scripts, either see /usr/share/doc/devscripts/README.gz or look at the output of dpkg -L devscripts
| grep /usr/bin.)
The two configuration files are /etc/devscripts.conf for system-wide defaults and ~/.devscripts for per-user settings. They are written
with bash(1) syntax, but should only have comments and simple variable assignments in them; they are both sourced (if present) by many of
the devscripts scripts. Variables corresponding to simple switches should have one of the values yes and no; any other setting is regarded
as equivalent to the default setting.
All variable names are written in uppercase, and begin with the script name. Package-wide variables begin with "DEVSCRIPTS", and are
listed below, as well as in the relevant manpages.
For a list of all of the available options variables, along with their default settings, see the example configuration file
/usr/share/doc/devscripts/devscripts.conf.ex. This is copied to /etc/devscripts.conf when the devscripts package is first installed.
Information about configuration options introduced in newer versions of the package will be appended to /etc/devscripts.conf when the pack-
age is upgraded.
Every script which reads the configuration files can be forced to ignore them by using --no-conf as the first command-line option.
PACKAGE-WIDE VARIABLES
The currently recognised package-wide variables are:
DEVSCRIPTS_CHECK_DIRNAME_LEVEL, DEVSCRIPTS_CHECK_DIRNAME_REGEX
These variables control scripts which change directory to find a debian/changelog file or suchlike, and some other miscellaneous
cases. In order to prevent unwanted, even possibly dangerous, behaviour, these variables control when actions will be performed.
The scripts which currently make use of these variables are: debc, debchange/dch, debclean, debi, debrelease, debuild and uscan, but
this list may change with time (and I may not remember to update this manpage). Please see the manpages of individual scripts for
details of the specific behaviour for each script.
SEE ALSO devscripts(1) and /usr/share/doc/devscripts/README.gz.
AUTHOR
This manpage was written for the devscripts package by the package maintainer Julian Gilbey <jdg@debian.org>.
DEBIAN Debian Utilities DEVSCRIPTS.CONF(5)