12-01-2008
Show an example for input and desired output please.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
This is the format of the file that i have
StartDate:10/01/06
EndDate :10/02/06
Cno Ccode
1 10
2 11
StartDate:10/03/06
EndDate :10/04/06
Cno Ccode
2 13
4 12
StartDate:10/01/06
EndDate :10/02/06 (5 Replies)
Discussion started by: kkm_job
5 Replies
2. UNIX for Dummies Questions & Answers
Hi ,
supoose i have a file in which a word is repeated so many times.
I just want the firts occurence of that word through grep and it should not go to the next one means get the first occurence and stop there.
Suggest me some solutions.
Thanks
Namish (10 Replies)
Discussion started by: namishtiwari
10 Replies
3. Shell Programming and Scripting
I try to run this script, however, it gives an exception in line 3. How do I do an assignment to a substituted variable?
#!/bin/bash
name=fruit
ext_$(eval echo ${name})=apple
tmp=ext_$(eval echo ${name})
if ]; then
echo "apple"
elif ]; then
echo "orange"
fi
echo ${!tmp}
Error... (2 Replies)
Discussion started by: angelokh
2 Replies
4. Programming
Is there any way to produce a code with all use dmacro to be substituted up to 'ready for compilation' condition?
Some macro are build up and it is hard to replace all them up to final code by hand.
I need to see the final line after all macro been applied by preprocessor.
How that could be... (5 Replies)
Discussion started by: alex_5161
5 Replies
5. Shell Programming and Scripting
I'm not getting the syntax correct to change a line only on the first occurrence:
I've tried to change only the first match and I've tried to change the from the second match forward
sed 's/<B>PT#/<tr><td class=\"pt1\" width=\"40%\"><B>pt#/1' $file > tmpfile.html
sed ... (0 Replies)
Discussion started by: dba_frog
0 Replies
6. UNIX for Dummies Questions & Answers
Hi there,
how can i print the first pattern occurrence in a .log file?
I want to print the filename of the first 17262?
I tried but all I can do is print all the lines with the number 17262?
I tried using awk and sed but nothing!:wall:
I just want filename!
Here´s an example:
17259... (3 Replies)
Discussion started by: BMatter
3 Replies
7. Shell Programming and Scripting
Dear all,
I have data like below and i need to add coloumn before the COUNT field to see the Percentage out of all COUNT field value for respective raw.
=============================================
COUNT CODE sConnType tConnType... (6 Replies)
Discussion started by: Iroshan
6 Replies
8. Shell Programming and Scripting
I have a file
# cat asasas
AAAAAA
11
22
33
44
BBBBB
NILNILNIL
AAAAAA
22
33
44
55
66
77
88
BBBBB
NILNILNIL (2 Replies)
Discussion started by: anil510
2 Replies
9. UNIX for Advanced & Expert Users
I have an output file which gives me the timely status of a server.
Sample file:
March 11 2014
21:10, 1, 2, 3, 4, 5, 6, 7, 8, 9, x, y, z...
21:05, 1, 2, 3, 4, 5, 6, 7, 8, 9, x, y, z...
21:00, 1, 2, 3, 4,... (3 Replies)
Discussion started by: rpm120
3 Replies
10. Shell Programming and Scripting
Hi all,
I started playing around with Python (2.6.6) trying to parse a file. No matter what I tried so far I am not able to print only the lines/group/backreference that have been affected by the substitution. Instead I get also the other lines too
File to parse:
some more text
... (2 Replies)
Discussion started by: zaxxon
2 Replies
LEARN ABOUT DEBIAN
kaptain
KAPTAIN(1) General Commands Manual KAPTAIN(1)
NAME
kaptain - Universal graphical front-end for command-line programs.
SYNOPSIS
kaptain [options] file
DESCRIPTION
kaptain reads the given file and builds a user-friendly dialog according to the grammar rules found in it.
See info kaptain for a detailed overview.
OPTIONS
kaptain accepts the following options:
-h, --help
Show summary of options.
-V Run in verbose mode.
--version
Show version of program.
--test Run in test mode. This means that commands are not executed when a button is pressed, only printed to the standard output.
-V, --verbose
Report more information on processing the input file. Internal representation of the grammar and the dialog tree is also printed.
Use this flag if Kaptain does not work as expected.
-c <host:port>, --client <host:port>
Establish communication channel as a client connecting to a server on <host> listening on <port>.
-s <port>, --server <port>
Listen to the specified <port> and accept the first connection. This will be used as a communication channel.
-p <command>, --pipe <command>
Start the given command and communicate with it on its standard input and output. Don't forget to quote <command> if it contains
spaces or other metacharacters used by the shell.
--stdio
Use standard input and output for communication. In this case you must specify an input file, thus grammar script cannot be read
from the standard input when it is used as a communication channel.
--no-input
Instructs Kaptain not to process messages received on the input channel.
--no-output
If this flag is set, Kaptain will not send any messages on its output channel.
AUTHOR
Zsolt Terek <terek@users.sourceforge.net>.
September 11, 2004 KAPTAIN(1)