02-06-2019
You don't need to "substitute them with numbers" - the shell will do that for you. Run the script with the -x (xtrace) option set, and you will see...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i am very new to UNIX
plz help me in this scenario
i have two text files as below
file1.txt
name=Rajakumar.
Discipline=Electronics and communication.
Designation=software Engineer.
file2.txt
name=Kannan.
Discipline=Mechanical.
Designation=CADD Design Engineer.
... (6 Replies)
Discussion started by: kkraja
6 Replies
2. 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
3. Shell Programming and Scripting
Hi,
I'm struggling to write a script to do the following,
-will go through each line in the file
-in a specific character positions, changes
the value to a new value
-These character positions are fixed througout the file
-----------------------
e.g.: file1.sh will have the following 3... (4 Replies)
Discussion started by: vini99
4 Replies
4. Shell Programming and Scripting
We have successfully created a comma delimited file, the results are correct from an sql database query. When using the following headers to print the file using print $data, an extra line feed is added and a blank row appears on the top of the data in Excel:
header("Expires: 0");
... (0 Replies)
Discussion started by: ifimbres
0 Replies
5. Shell Programming and Scripting
Hello,
This is my first post on the forums. So I want to start by thanking anyone who is kind enough to read this post and offer advise. I hope to be an active contributor now that I've found these forums.
I have an issue that I figure would be a good first post..
I have 2 text files... (5 Replies)
Discussion started by: efciem
5 Replies
6. Shell Programming and Scripting
I have a text file that has data like:
Data "12345#22"
Fred
ID 12345
Age 45
Wilma
Dino
Data "123#22"
Tarzan
ID 123
Age 33
Jane
I need to figure out a way of adding 1,000,000 to the specific lines (always same format) in the file, so it becomes:
Data "1012345#22"
Fred
ID... (16 Replies)
Discussion started by: say170
16 Replies
7. Shell Programming and Scripting
I have list of files in a directory 'dir'. Each file is of type HTML. I need to read each file and get the string which starts with 'http' and write them in a new text file. How can i do this shell scripting?
file1.html
<head>
<url>http://www.google.com</url>
</head>
file2.html
<head>... (6 Replies)
Discussion started by: vel4ever
6 Replies
8. Shell Programming and Scripting
HI
I have 100 files in below folder:-
/home/lkj/TEST
File name like below
undo_ARL01003_120907-155022.mos
undo_ARL01006_120908-155042.mos
i want replace one first line of each file to pt all
i want change file name as below.
ARL01003.mos
ARL01006.mos
Thanks (2 Replies)
Discussion started by: asavaliya
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
10. UNIX for Beginners Questions & Answers
In the awk below I am trying to cp and paste each matching line in f2 to $3 in f1 if $2 of f1 is in the line in f2 somewhere. There will always be a match (usually more then 1) and my actual data is much larger (several hundreds of lines) in both f1 and f2. When the line in f2 is pasted to $3 in... (4 Replies)
Discussion started by: cmccabe
4 Replies
diffmk(1) General Commands Manual diffmk(1)
NAME
diffmk - mark changes between two different versions of a file
SYNOPSIS
prevfile currfile markfile
DESCRIPTION
compares the previous version of a file with the current version and creates a file that includes ``change mark'' commands. prevfile is
the name of the previous version of the file and currfile is the name of the current version of the file. generates markfile which con-
tains all the lines of the currfile plus inserted formatter ``change mark'' requests. When markfile is formatted, changed or inserted text
is shown by a character at the right margin of each line. The position of deleted text is shown by a single
If the characters and are inappropriate, a copy of can be edited to change them because is a shell script.
EXTERNAL INFLUENCES
International Code Set Support
Single- and multi-byte character code sets are supported.
EXAMPLES
A typical command line for comparing two versions of an file and generating a file with the changes marked is:
can also be used to produce listings of C (or other) programs with changes marked. A typical command line for such use is:
where the file contains:
The request can specify a different line length, depending on the nature of the program being printed. The request is probably needed only
for C programs.
WARNINGS
Aesthetic considerations may dictate manual adjustment of some output.
does not differentiate between changes in text and changes in formatter request coding. Thus, file differences involving only formatting
changes (such as replacing with in a text source file) with no change in actual text can produce change marks.
Although unlikely, certain combinations of formatting requests can cause change marks to either disappear or to mark too much. Manual
intervention may be required because the subtleties of various formatting macro packages and preprocessors is beyond the scope of cannot
tolerate commands in its input (see tbl(1)), so any request that would appear inside a range is silently deleted. The script can be
changed if this action is inappropriate, or can be run on two files that have both been run through the preprocessor before any comparisons
are made.
uses and thus has the same limitations on file size and performance that may impose (see diff(1)). In particular the performance is non-
linear with the size of the file, and very large files (well over 1000 lines) may take extremely long to process. Breaking the file into
smaller pieces may be advisable.
also uses the ed(1) editor. If the file is too large for error messages may be embedded in the file. Again, breaking the file into
smaller pieces may be advisable.
SEE ALSO
diff(1), nroff(1).
diffmk(1)