12-08-2013
oh yeah, i tried the sed command, still no luck, gave me the same results, i really appreciate you being patient with me and helping, i just dont know how else i could go about this, do you know how i could debug that file?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a problem with a simple script I am trying to write. I want a user to type grep, sed commands that are then stored in variables. Those variables are stored in a function, and the function is then called to execute the commands. The idea is that the user does it step by step.
... (4 Replies)
Discussion started by: Trufla
4 Replies
2. Shell Programming and Scripting
I have a current code working(named subst1) having a user be able to type this line to substitute words using the sed command:
subst1 old-pattern new-pattern filename
Here is my shell script:
#!/bin/bash
# subst1
ARGS=3
E_BADARGS=65
if
then
echo "Usage: `basename $0`... (1 Reply)
Discussion started by: Todd88
1 Replies
3. Shell Programming and Scripting
Hey everybody
I need some help on how to order the data in file such as a file have first name last name and city and i would like to order them to in the same order by using sed
thanks alot for your time (6 Replies)
Discussion started by: halola85
6 Replies
4. UNIX for Dummies Questions & Answers
Hi i have a problem how to put som lines on top or in the bottom of the text with sed.
problem is that i am reading from stdin and when i have som lines starting with ++, i have to put some characters on the top of the lines starting with that ++
example of input
oooo
++abcd
++befg... (1 Reply)
Discussion started by: Dun
1 Replies
5. Shell Programming and Scripting
Hi folks, maybe somebody here can help me.
I have 2 files. File A and File B. File A contains URLs leading to files on the Internet, with one URL per line; The format of the URLs on each line in File A is .
File B contains only the filenames from each line in File A; One filename per line.
... (11 Replies)
Discussion started by: o0110o
11 Replies
6. Shell Programming and Scripting
Hi all,
I have files with the following names;
afgcxa.pem4jan.rain.nc
afgcxa.pem4feb.rain.nc
afgcxa.pem4mar.rain.nc
afgcxa.pem4apr.rain.nc
I want to rename them to
afgcxa.pem4-01.jan.rain.nc
afgcxa.pem4-02.feb.rain.nc
afgcxa.pem4-03.mar.rain.nc ... (5 Replies)
Discussion started by: Muhammad Rahiz
5 Replies
7. Shell Programming and Scripting
Hi,
i want to replace sub text which is in the middle of long text.
let me be more clear with an example.
Here is the actual text in the xml file
<module-option name="principalDNSuffix">,cn=Users,dc=X,dc=Y</module-option>
Now, in the above text, i want to replace all the content lying... (3 Replies)
Discussion started by: sunrexstar
3 Replies
8. Shell Programming and Scripting
Generate a ddl file, we have a flat file which contains many commands like REM, CREATE table, TRuncate etc
This script should copy only create table statements to the ddl file.
Create stmts can be in a single or multiple lines.
ex:- INPUT FILE
create table tbl1
(fld1,... (5 Replies)
Discussion started by: learninfo
5 Replies
9. 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:
One problem with the use of sed in simple text substitutions is that sed will intepret some characters as... (1 Reply)
Discussion started by: raymondbn
1 Replies
10. Shell Programming and Scripting
Hi Guys,
I have a xml file as below where I need to find the particular XML tag(<dpath>) and delete the content of it.
<?xml version="1.0" encoding="UTF-8"?>
<title>XML</title><head>Ram</head><ControlCenter><doStatus>1</doStatus></ControlCenter><exitlabel>Gzip... (7 Replies)
Discussion started by: Vinoth Kumar G
7 Replies
LEARN ABOUT DEBIAN
minc_modify_header
MINC_MODIFY_HEADER(1) MINC User's Guide MINC_MODIFY_HEADER(1)
NAME
minc_modify_header - modify the attributes in the header of a minc file
SYNOPSIS
minc_modify_header [<options>] <file>.mnc
DESCRIPTION
Minc_modify_header allows the modification, insertion or deletion of attributes in a minc file. If possible, the file is modified in place,
without copying the data. This will happen when inserting (modifying) an attribute that already exists and that ends up being the same
length or shorter in the new file. If an attribute is deleted or lengthened, then a complete copy of the data is made, resulting in a com-
pletely new file that replaces the original.
If the file is compressed, then it is first decompressed into a file whose name is either the same as that of the original file up to the
".mnc" extension or the same minus the compression extension (".bz", ".bz2", ".gz", ".Z", ".z" or ".zip"). The new file will not be re-
compressed.
Care is taken to completely overwrite any existing attribute when inserting a new attribute so that information is guaranteed to be removed
from the file.
OPTIONS
Note that options can be specified in abbreviated form (as long as they are unique) and can be given anywhere on the command line.
-sinsert var:attr=value
Insert a string attribute into the header. If the attribute does not exist or the new string is longer than the existing one, then
all data in the file will be copied.
-sappend var:attr=value
Similar to -sinsert, but appends the string to the attribute's value. If the attribute already exists it must be of string type.
-dinsert var:attr=value(,...)
Insert a double precision attribute into the header. If the attribute does not exist or the new attribute is longer than the exist-
ing one, then all data in the file will be copied. A comma-separated array of values can be specified.
-dappend var:attr=value(,...)
Similar to -dinsert, but appends the list of double precision values to the attribute's value. If the attribute already exists it
must be of double precision type.
-delete var:attr
Delete an attribute from the header. USE OF THIS OPTION WILL FORCE A COMPLETE COPY OF ALL DATA TO BE MADE. Use -sinsert with an
empty string to delete information without copying data (the attribute will continue to exist).
-help Print summary of command-line options and exit.
-version
Print the program's version number and exit.
EXAMPLES
:
To replace the patient name with an identifier string:
minc_modify_header file.mnc -sinsert 'patient:full_name=C02-F0023'
To delete the patient name completely (forcing a copy of all data):
minc_modify_header file.mnc -delete 'patient:full_name'
To hide the patient name without copying data, assuming that we know that the attribute exists (the attribute will remain in the file, but
it will be empty):
minc_modify_header file.mnc -sinsert 'patient:full_name='
AUTHOR
Peter Neelin
COPYRIGHTS
Copyright (C) 1995 by Peter Neelin
$Date: 2004-05-25 21:33:11 $ MINC_MODIFY_HEADER(1)