06-03-2009
Can Pls Post exactly what is your input and the output your expecting in the formatted fashion.I hope then you will get more responses.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am hoping someone can provide some guidance on using context based search and replace to search for a pattern and then do a search and replace in the line that follows it. For example, I have a file that looks like this:
<bold>bold text
</italic>
somecontent
morecontent... (3 Replies)
Discussion started by: charissaf67
3 Replies
2. Shell Programming and Scripting
Hi
This is what I was trying to do, comment one line and add something different in a new line right next.
This is the command I want to do
more .profile | sed 's,STRING1, #STRING1 NEWLINE STRING2,'
(I´m using ',' because my string is something like this
exec... (3 Replies)
Discussion started by: alcalina
3 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I have a file and in that, I want to search for a aprticular word and then replace another word in the same line with something else.
Example: In file abc.txt, there is a line
<host oa_var="s_hostname">test</host>
I want to search with s_hostname text and then replace test with... (2 Replies)
Discussion started by: sshah1001
2 Replies
4. Shell Programming and Scripting
Hi there!
I am really enjoying working with sed. I am trying to come up with a sed command to replace some occurrences (not all) in the same line, for instance:
I have a command which the output will be:
200.300.400.5 0A 0B 0C 01 02 03
being that the last 6 strings are actually one... (7 Replies)
Discussion started by: ppucci
7 Replies
5. Shell Programming and Scripting
Hi guys,
got a problem here with sed on the command line.
If i have a string as below:
online xx:wer:xcv: sdf:/asdf/http:https-asdfd
How can i match the pattern "http:" and replace the start of the string to the pattern with null?
I tried the following but it doesn't work:
... (3 Replies)
Discussion started by: DrivesMeCrazy
3 Replies
6. Shell Programming and Scripting
Hi
I am trying to search and replace a multi line pattern in a php file using awk.
The pattern starts with
<div id="navbar">
and ends with
</div>
and spans over an unknown number of lines.
I need the command to be a one liner.
I use the "record separator" like this :
awk -v... (8 Replies)
Discussion started by: louisJ
8 Replies
7. Shell Programming and Scripting
Hi,
I am have one file with a line
group=project_live
I need to replace it with line
group=project_live_support
before I execute some application related script.
The potentianl problem is when I replace this with sed using command
sed... (2 Replies)
Discussion started by: bhaskar_m
2 Replies
8. 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:
I have file which has got the following content
sam 123 LD 41
sam 234 kp
sam LD 41
kam pu
sam LD 61
Now... (1 Reply)
Discussion started by: muchyog
1 Replies
9. Shell Programming and Scripting
I have a log file that contains many lines but contains the following line three times:
related_pin : "t_bypass";
Here are the 3 occurrences and the two lines after from my file.txt:
related_pin : "t_bypass";
sdf_cond : "rstq_b";
timing_sense : negative_unate;
... (6 Replies)
Discussion started by: bobbygb2003
6 Replies
10. Shell Programming and Scripting
All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed...
I have an input file similar to:
&LOG
&LOG Part: "@DB/TC10000021855/--F"
&LOG
&LOG
&LOG Part: "@DB/TC10000021852/--F"
&LOG Cloning_Action: RETAIN
&LOG Part: "@DB/TCCP000010713/--A"
&LOG
&LOG... (5 Replies)
Discussion started by: KarmaPoliceT2
5 Replies
LEARN ABOUT DEBIAN
sdfcli
SDFCLI(1) User Contributed Perl Documentation SDFCLI(1)
NAME
sdfcli - Command Line Interface Utility
PURPOSE
sdfcli extracts command line interface (CLI) information from applications and formats it into SDF.
USAGE
usage : sdfcli [-h[help]] [-o[out_ext]]
[-l[log_ext]] [-O[out_dir]] [-w wrap]
utility ...
purpose: format a utility's command line interface into SDF
version: 2.000 (SDF 2.001)
The options are:
Option Description
-h display help on options
-o output file extension
-l log file extension
-O output to input file's (or explicit) directory
-w column at which to wrap option specifications
DESCRIPTION
The -h option provides help. If it is specified without a parameter, a brief description of each option is displayed. To display the
attributes for an option, specify the option letter as a parameter.
By default, generated output goes to standard output. To direct output to a file per input file, use the -o option to specify an extension
for output files. If the -o option is specified without a parameter, an extension of out is assumed.
Likewise, error messages go to standard error by default. Use the -l option to create a log file per input file. If the -l option is
specified without a parameter, an extension of log is assumed.
By default, generated output and log files are created in the current directory. Use the -O option to specify an explicit output directory.
If the -O option is specified without a parameter, the input file's directory is used.
sdfcli executes each argument with a -h flag and converts the resultant output to nicely formatted SDF. An argument of "-" specifies that
the help should be read from standard input.
Formatting is done as follows:
1. lines are tagged as Example paragraphs, with the first line formatted to wrap option usage specifications nicely
2. if a line is found that starts with 'options:', it is replaced with a Body paragraph saying "The options are:", and the following lines
are formatted as a table of codes and descriptions
3. if a line is found that starts with 'aliases:', it is replaced with a Body paragraph saying "The aliases are:", and the following lines
are formatted as a table of names and descriptions
4. each option code in the table is formatted as a hypertext jump to a tag called cmd_opt where:
o cmd is the command name
o opt is the option code
The -w option specifies at what column to wrap option specifications. The default is 50 - this is the best for output imported into the
Mincom templates.
LIMITATIONS AND FUTURE DIRECTIONS
The table formats used are hard coded.
perl v5.12.4 2011-11-09 SDFCLI(1)