Making some guesses at what you were trying to do, you might want to consider this alternative script:
With your sample data, invoking this script with:
writes:
into Newinput.txt.
This User Gave Thanks to Don Cragun For This Post:
Greetings, people of UNIX/Linux forums.
I am having a problem with a script, where I am trying to create a new variable. The value of this variable would be dependent on the value in a couple other previous variables (all variables are 2-digit integers). Here is my code:
#set the stations... (3 Replies)
Hi Unix experts
I have simple text files in which the number of lines vary from one file to another. They look like the following:
#
#
.
.
34 46
76 72
39 68
I want to grab the first number of the last line of each file (let's say A= 39 in the above example), which is... (2 Replies)
I want to put text stored in a variable into a file on the 7th line. I'm having trouble with this line:
sed '7i\'$text'' $file
It works perfectly for a single word, but fails if there are two words because of the space. I've tried several forms of quoting and this is the only one that... (2 Replies)
Dear All,
we have a command output which looks like :
Total 200 queues in 30000 Kbytes
and we're going to get "200" and "30000" for further process. currently, i'm using :
numA=echo $OUTPUT | awk '{print $2}'
numB=echo $OUTPUT | awk '{print $5}'
my question is : can I use just one... (4 Replies)
In my script I am using sed to insert a line.
Suppose I have a variable called ck_size=5 and a temporary file called tmp
I want to add a certain line in the tmp file .Please see the below command
sed -i '2a\maitee is $ck_size' /dun/homes/lrsprod/tmp
I want in 2 line of tmp file... (7 Replies)
Hi i have to insert the below line into a specific line number of another file
export MBR_CNT_PRCP_TYPE_CODES_DEL="'01','02','04','05','49','55','UNK'"
I have passed the above line to a variable say ins_line. I have used below command to perform the insert
awk 'NR==3{print "'"${ins_line}"'"}1'... (1 Reply)
Hi All,
I have a directory containing multiple files.
and also a txt file which contains the list of all filenames and certain values.
I want to read the text file line by line and if its 2nd column is matched with the filename in directory, then it must insert the values in 7th column to... (14 Replies)
hi all,
i have one shell script like this
#!/bin/bash -xv
ENV_NAME=`cat $IB_HOME_DIR/cfg/ibProfile.sh | grep "RDM_CONN" | cut -f 2 -d "@"`
CURRENT_DIR=`pwd`;
string=$IB_HOME_DIR
string1="$string/FRGFOLDER/input"
#sed "s/string3/$string1" frg_event_src.sql > modifiedinsert.sql
sqlplus... (2 Replies)
I have the following script, and I want to assign the output ($10 and $5) from awk to N and L:
grdinfo data.grd | awk '{print $10,$5}'| read N L
output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Discussion started by: geomarine
8 Replies
LEARN ABOUT DEBIAN
dpkg-www
DPKG-WWW(1) General Commands Manual DPKG-WWW(1)NAME
dpkg-www - program to remotely open a WWW Debian package browser
SYNOPSIS
dpkg-www [-s|--stdout] [-h|--host host] [query]
DESCRIPTION
dpkg-www is used to remotely control a WEB browser and open a dpkg URL on the local host from an interactive shell or script.
If the command is invoked while running under X-window the script will try to find an installed X browser to open the specified URL. If
not running under X it will try to use a text browser instead.
If Netscape is found and a Netscape instance is already running it will be asked to open the dpkg URL on localhost with the optional query
supplied on the command line. If there is no browser running, it will start automatically a new one.
The functionality provided by this program is identical to running a web browser with the -remote openURL(http://localhost/cgi-bin/dpkg)
argument or opening the same URL from within the browser.
dpkg-www-installer is an helper application which can configured in the WWW browser for web installation. It should never be invoked
directly by the user.
OPTIONS -s, --stdout
Redirect output to stdout. Requires one of the text browsers (lynx, lynx-ssl or links) installed.
-h, --host host
Send the query to a remote host, where dpkg-www must be installed.
query Specifies an optional package name, an absolute pathname or a query argument which is passed to the dpkg cgi-bin. See dpkg-www(8)
for more information about the use of the cgi.
FILES
/etc/dpkg-www.conf
~/.dpkg-www
Configuration files for dpkg-www. It is not necessary for these files to exist, there are sensible defaults for everything, but you
can specify your preferred www browser with the DPKG_WWW_BROWSER variable, for example: DPKG_WWW_BROWSER=mozilla
EXAMPLES
dpkg-www
This would open a dpkg URL on localhost listing all the installed packages.
dpkg-www bash
This would open a dpkg URL asking info on the bash package.
dpkg-www -h pisolo bash
This would open a dpkg URL asking info on the bash package on host pisolo.
dpkg-www 'dpkg*'
This would open a dpkg URL listing all packages matching dpkg*.
dpkg-www /bin/bash
This would open a dpkg URL asking info on the package(s) owning the file /bin/bash .
dpkg-www depends=svgalib
This would open a dpkg URL listing all packages depending on svgalib.
dpkg-www --stdout depends=awk | grep ^ii
This would list on stdout all packages depending on awk and grep all lines of installed packages.
SEE ALSO dpkg(8), dpkg-www(8)AUTHOR
Massimo Dal Zotto <dz@debian.org>.
Bugs should be reported via the normal Debian bug reporting system.
LICENCE
dpkg-www is licensed under the GNU General Public License version 2.
September 1, 2004 DPKG-WWW(1)