09-16-2013
Hi Don,
Thanks for your reply...
Yes this is for my UNIX class work. my teacher ask me to do some scripts.so i try this but i struck....
Input will not be arranged as above it be in any kind of order and we ll use sort command to sort in wanted format..
No, my input digit is up to 0 to 12 digits some time..
Moderator's Comments:
|
|
Homework can only be posted in the Homework & Coursework Questions Forum and must include your full school name, professor, and course number. Please refile this request in the Homework & Coursework Questions Forum.
|
|
Last edited by Don Cragun; 09-16-2013 at 11:50 AM..
Reason: Homework violation.
10 More Discussions You Might Find Interesting
1. Programming
(gdb)... (1 Reply)
Discussion started by: cdbug
1 Replies
2. Shell Programming and Scripting
Hello,
I am new in perl and in regular exprecion; so I am looking for help (or an experienced advise.)
The target is a triming spaces from a string: i.e., remove spases from begining and from end of a string.
One of main point of a searched solution is performance: for current task it is... (2 Replies)
Discussion started by: alex_5161
2 Replies
3. Shell Programming and Scripting
Title says all :p
Thanks for your help (4 Replies)
Discussion started by: drbiloukos
4 Replies
4. Shell Programming and Scripting
Hi! I've a C file which consist of many function definitions with numbers at the beginning as shown below..
10 void search()
11 {
12 /*body
14 *
15 *
17 *
18 *
40 *
42 *
60 }
90 void func_name()
95 {
99 /*body
100 *
105 *
111 * (7 Replies)
Discussion started by: abk07
7 Replies
5. Shell Programming and Scripting
I am trying to check if files staring with filename but ending with diffent dates e.g. filename.2011-10-25.
The code I am using is below
if
It works find only if one file is present but returns binary operator expected
when there are mulptiple files.
Please help me correcting it. I... (5 Replies)
Discussion started by: ningy
5 Replies
6. UNIX for Dummies Questions & Answers
I have a group of files that I need to be sorted by number. I have tried to use the sort command without any luck.
ls includes*
includes1
includes10
includes11
includes12
includes2
includes3
includes4
includes5
includes6
includes7
includes8
includes9
I have tried ls includes*... (6 Replies)
Discussion started by: newbie2010
6 Replies
7. Shell Programming and Scripting
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies
8. Shell Programming and Scripting
Hi,
I have numerous files which have data in the following format
A|B|123.|Mr.|45.66|33|zz
L|16.|33.45|AC.|45.
I want to remove decimal point only if it is last character in a number.
O/p should be
A|B|123|Mr.|45.66|33|zz
L|16|33.45|AC.|45
I tried this
sed -e 's/.|/|/g'
Problem... (6 Replies)
Discussion started by: wahi80
6 Replies
9. Shell Programming and Scripting
Hello,
Here is my text data excerpted from the webpage:
input
My target is to get:
What i tried is:
sed 's/.*\(connector\)/1/' input > output
but all characters coming before the word "connector" are deleted which is not good for me.
My question: (9 Replies)
Discussion started by: baris35
9 Replies
10. UNIX for Beginners Questions & Answers
im trying to search for a WORD in a file which
begins with a number
followed by a hypen
follwed multiple words
and end with a dot "."
and pront the entire line which matches the above.
Please note that there is a space at the begining of each line
i/p file
19458 00000-CONTROL-PARA.... (5 Replies)
Discussion started by: anijan
5 Replies
TSORT(1) BSD General Commands Manual TSORT(1)
NAME
tsort -- topological sort of a directed graph
SYNOPSIS
tsort [-l] [-q] [file]
DESCRIPTION
tsort takes a list of pairs of node names representing directed arcs in a graph and prints the nodes in topological order on standard output.
Input is taken from the named file, or from standard input if no file is given.
Node names in the input are separated by white space and there must be an even number of node pairs.
Presence of a node in a graph can be represented by an arc from the node to itself. This is useful when a node is not connected to any other
nodes.
If the graph contains a cycle (and therefore cannot be properly sorted), one of the arcs in the cycle is ignored and the sort continues.
Cycles are reported on standard error.
The options are as follows:
-l Search for and display the longest cycle. Can take a very long time.
-q Do not display informational messages about cycles. This is primarily intended for building libraries, where optimal ordering is not
critical, and cycles occur often.
SEE ALSO
ar(1)
HISTORY
A tsort command appeared in Version 7 AT&T UNIX. This tsort command and manual page are derived from sources contributed to Berkeley by
Michael Rendell of Memorial University of Newfoundland.
BSD
April 1, 1994 BSD