08-20-2009
Insert text below other text
I need help in bash.
This is the problem
I have a php file that I edit, add a line under another.
PHP file:
<select name="RecPerPage" id="RecPerPage" onchange="this.form.submit();" class="phpmaker">
<option value="50">Select version</option>
</select>
I need insert "<option value="anything">Select version1</option>" below
"<option value="50">Select version</option>"
Please help me...
I tried for a long time but not get anything
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello! I have a text file containing
some text : : : bla
other text : : : bla
any text : : : bla
containing 3 columns separated by the ':' sign.
Now i want to insert 'this' in the 2nd line after the 2nd column-deliminiter (i.e. into 3rd column), like
some text : : : bla
other text :... (1 Reply)
Discussion started by: knoxo
1 Replies
2. Shell Programming and Scripting
Dear Folks :),
I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp.
I can do this in vi editor by using this command :g/^/s//BBB_
e,g I have a file named as Test.dat and it containins below text:
michal... (4 Replies)
Discussion started by: Muhammad Afzal
4 Replies
3. Shell Programming and Scripting
Hi all,
I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output.
sed '$a\
hi...
' shell > shell1
But I face problem when using the same in script. It is throwing the error as,
sed: command garbled:... (4 Replies)
Discussion started by: iamgeethuj
4 Replies
4. Shell Programming and Scripting
Hi All,
Can someone pls help me to insert some text on a file.
my file contains something like below..
AKBULBU,
BALUMIL,
BATCH,BATCH
BOARROB,
BOTAKAT,
C57896,
CAKIOZE,
CHECMER,
CICOFRA,
CISZPAW,2194485
I want output as
USER_ID, LOGIN_ID (6 Replies)
Discussion started by: harshakusam
6 Replies
5. Shell Programming and Scripting
I need help with this please:
I have this text:
<li><a href="login.php">Ingresar</a>
and I need insert this text below:
<li><a href="http://localhost/dummysila/">anything<a></li>
help please!
Note: all this with bash....command sed I think.... (1 Reply)
Discussion started by: bobbasystem
1 Replies
6. Shell Programming and Scripting
Input:
fstab is a configuration
file that contains information
of all the partitions
and storage devices
in your computer.
The file is located under /etc,
so the full path
to this file is /etc/fstab.
The >>>>> characters would be replaced by some texts.
For example if i run a... (5 Replies)
Discussion started by: cola
5 Replies
7. Shell Programming and Scripting
sed 's/$/TEST/g' will insert TEST at the end of each line. i want to insert TEST at column 64 (7 Replies)
Discussion started by: lawsongeek
7 Replies
8. Shell Programming and Scripting
Hi,
I have a single value in insertval file. I want to load that value to database with the current date. I tried the below code but it is inserting <NULL> to database and echo $c is also null.
cat insertval | awk -F ' ' '{print $1}' > c
echo c=$c
data=`sqlplus -s user/pwd@hostname <<EOF ... (5 Replies)
Discussion started by: Neethu
5 Replies
9. Shell Programming and Scripting
I want to put a particular text, say, the hash '#' before each of the first n lines of a file.
How can I do that? (4 Replies)
Discussion started by: hbar
4 Replies
10. Shell Programming and Scripting
Hi,
I am trying to check for missing dates in a file and would want to insert the missing date into the file.
Currently the script is as below
#!/bin/ksh
dates="dates"
cat ${dates} | grep -v "^#"
curr_month=`date '+%m`
curr_day=`date '+%d`
curr_year=`date '+%Y`
#curr_month=02... (7 Replies)
Discussion started by: newbie_01
7 Replies
DCMD(1) General Commands Manual DCMD(1)
NAME
dcmd - expand file lists of .dsc/.changes files in the command line
SYNOPSIS
dcmd [options] [command] [changes-file|dsc-file] [...]
DESCRIPTION
dcmd replaces any reference to a .dsc or .changes file in the command line with the list of files in its 'Files' section, plus the file
itself. It allows easy manipulation of all the files involved in an upload (for changes files) or a source package (for dsc files).
If command is omitted (that is the first argument is an existing .dsc or .changes file), the expanded list of files is printed to stdout,
one file by line. Useful for usage in backticks.
OPTIONS
There are a number of options which may be used in order to select only a subset of the files listed in the .dsc or .changes file. If a
requested file is not found, an error message will be printed.
--dsc Select the .dsc file.
--schanges Select .changes files for the 'source' architecture.
--bchanges Select .changes files for binary architectures.
--changes Select .changes files. Implies --schanges and --bchanges.
--archdeb Select architecture-dependent binary packages (.deb files).
--indepdeb Select architecture-independent binary packages (.deb files).
--deb Select binary packages (.deb files). Implies --archdeb and --indepdeb.
--archudeb Select architecture-dependent udeb binary packages.
--indepudeb Select architecture-independent udeb binary packages.
--udeb Select udeb binary packages. Implies --archudeb and --indepudeb.
--tar, --orig Select the tar file.
--diff Select the Debian diff file.
Each option may be prefixed by --no to indicate that all files not matching the specification should be selected.
It is not possible to combine positive filtering options (e.g. --dsc) and negative filtering options (e.g. --no-changes) in the same dcmd
invocation.
--no-fail-on-missing, -r
If any of the requested files were not found, do not output an error.
EXAMPLES
Copy the result of a build to another machine:
$ dcmd scp rcs_5.7-23_amd64.changes elegiac:/tmp
rcs_5.7-23.dsc 100% 490 0.5KB/s 00:00
rcs_5.7-23.diff.gz 100% 12KB 11.7KB/s 00:00
rcs_5.7-23_amd64.deb 100% 363KB 362.7KB/s 00:00
rcs_5.7-23_amd64.changes 100% 1095 1.1KB/s 00:00
$
$ dcmd --diff --deb scp rcs_5.7-23_amd64.changes elegiac:/tmp
rcs_5.7-23.diff.gz 100% 12KB 11.7KB/s 00:00
rcs_5.7-23_amd64.deb 100% 363KB 362.7KB/s 00:00
$
Check the contents of a source package:
$ dcmd md5sum rcs_5.7-23.dsc
8fd09ea9654cda128f8d5c337d3b8de7 rcs_5.7.orig.tar.gz
f0ceeae96603e823eacba6721a30b5c7 rcs_5.7-23.diff.gz
5241db1e231b1f43ae5514b63d2523f8 rcs_5.7-23.dsc
$
$ dcmd --no-diff md5sum rcs_5.7-23.dsc
8fd09ea9654cda128f8d5c337d3b8de7 rcs_5.7.orig.tar.gz
5241db1e231b1f43ae5514b63d2523f8 rcs_5.7-23.dsc
$
SEE ALSO
dpkg-source(1), dpkg-genchanges(1).
AUTHOR
This program was written by Romain Francoise <rfrancoise@debian.org> and is released under the GPL, version 2 or later.
DEBIAN
Debian Utilities DCMD(1)