I'm trying to write a ksh script that uses awk, but I want to pass variables to awk. For example (not working):
if ];then
searchstr=$1
lsof -i | awk '{if($9~/SEARCHSTR/) print $2} SEARCHSTR=$searchstr'
else
echo "usage: $0 <search string>"
fi
I tried several options. Is it... (3 Replies)
Hi all,
I just setup postfix on my server thats running Centos 5.x with webmin. Now I can send email out of the server but I cant receive email. Server side I can telnet into the 110 and 25 port but coming from the outside of the box I can only telnet into the 110 port but not port 25. The... (1 Reply)
I have to run a script provided by a vendor. Its an executable so I can't change it.
basically after I call it it prompts me for a password. The script does not provide a way for me to pass a password with the command that calls the script.
I would like to automate running this script from... (5 Replies)
Hey all,
Unfortunately I have only basic knowledge of awk and/or scripting. If I have a file with lines that can look similar to this:
Name=line1 Arg1=valueA Arg2=valueB Arg3=valueC
Name=line2 Arg1=valueD
Name=line3 Arg1=valueE Arg3=valueF
Name=line4 Arg2=valueG ... (4 Replies)
can someone please explain to me what i'm doing wrong with this code:
WELT=$(awk '(($1 ~ "^${caag}$") || ($2 ~ "^${caag}$"))' /tmp/Compare.TEXT)
when run from the command line, it works. but it seems to be having a problem doing the comparison when variables are involved.
i tested from... (1 Reply)
Good day Geeks,
Am having an issue with using variables in a rather simple script, the script is as follows:
#!/bin/bash
### Script written by Adigun Gbenga
### Date: April 28, 2012
array=( 1 2 3 4 5 29 7 8 9... (6 Replies)
Hi Guys,
I have an issue with awk and variables. I have trawled the internet and forums but can't seem to get the exactt syntax I need.
I have tried using awk -v and all sorts of variations but I have hit a brick wall. I have spent a full day on this and am just going round in circles.
... (3 Replies)
Hi,
After looking at the differents post on this forum, I am convinced that I will benefit from the experience of advanced Unix user on some script I have already done for an aeronautical study. Here is one of them :
Step 1 :
sed -e "s/??/00/g" Base_Awk.txt > Awk_Cut_00.txt4;
sed... (11 Replies)
Hello experts!
I have a file1 with the following format (yr,day, month, hour,minute):
201201132435
201202141210
201304132030
201410100110
...
What i want to do is to assign variables and then use them in the curl command to download the text of each event from a web page.
What I have... (6 Replies)
Discussion started by: phaethon
6 Replies
LEARN ABOUT FREEBSD
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)