05-10-2012
What, exactly, is this single case supposed to do?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Trying to search a log file for a string, starting from a certain point in the log file. I want to return the number of lines that contain the search string and the total number of lines in the log file. Here's the part of the script I'm having problems with:
set -- $(awk -v... (12 Replies)
Discussion started by: mglenney
12 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I'm trying to write a bash script that will query the current system time (OS X 10.6.6) and then convert the output from HH:MM:SS into time in seconds. The output of the system time command (systemsetup -gettime) is returned as:
Time: HH:MM:SS
so I wanted to use awk -F: to grab... (5 Replies)
Discussion started by: xaiu
5 Replies
3. Shell Programming and Scripting
EDIT: This has been SOLVED. Thanks!
Greetings everyone,
I've posted a few threads with some quick help questions, and this is another one of those. I can't post enough gratitude for those much more knowledgeable than myself who are willing to give good advice for my minor issues. Now,... (2 Replies)
Discussion started by: Eblue562
2 Replies
4. Shell Programming and Scripting
So I am a newbie obviously but I need some help.
I am trying to run a script to check that the number of fields in a database is equal to 4, if not they should try again and run an appropriate database file. The fields are separated by a semi colon. I've tried a lot of things, this what I'm... (3 Replies)
Discussion started by: mb001
3 Replies
5. Shell Programming and Scripting
Hi ! I'm working into my first bash script to make some xml modification and it's going to make me crazy lol .. so I decide to try into this forum to take some ideas from people that really know about this!
This is my situation I've and xml file with a lots of positional values with another tags... (9 Replies)
Discussion started by: juampal
9 Replies
6. Shell Programming and Scripting
This is the final first release of the dynamic menu generator for pekwm (WM).
#!/bin/bash
function param_val {
awk "/^${1}=/{gsub(/^${1}="'/,""); print; exit}' $2
}
echo "Dynamic {"
for CF in `ls -c1 /usr/share/applications/*.desktop`
do
name=$(param_val Name $CF)
... (3 Replies)
Discussion started by: alexscript
3 Replies
7. Shell Programming and Scripting
I have written a script which works fine, to remove patterns contained in EXCLUDE.DAT from input.txt
awk 'BEGIN {n=0;while (getline < "EXCLUDE.DAT" > 0){ex=$0;n++}} {for(var in ex){print var "-" ex $0 ;i++}}' input.txt
The last problem I need to solve is how to pass the file... (3 Replies)
Discussion started by: nixie
3 Replies
8. Shell Programming and Scripting
I have the following script set up and working properly in bash. It basically copies a set of lines which match "AS1100002" from one file and replaces the same lines in another file.
awk -vN=AS1100002* 'NR==FNR { if($1 ~ N)K=$0; next }
{ if($1 in K) $0=K; print }' $datadir/file1... (7 Replies)
Discussion started by: ncwxpanther
7 Replies
9. Shell Programming and Scripting
Hello im new here... Im trying to read file and create folders from words in it but i get this for loop error
awk : line 3 : syntax error at or near for
my code is..
#!/bin/bash
begin
for (( i=1;i<=5;i++));
do
awk -v i=$i $0 { print $i }
mkdir $i
done
{print $i}
end {}
i have... (7 Replies)
Discussion started by: boxstep
7 Replies
10. Shell Programming and Scripting
Hi,
I have 100 files containing different values in single column,
I want to split those files in two separate files (file2 and file3) based on average value of first column of each file,
for those files I am working on the following script
#bin/bash
for memb in $(seq 1 100)
do
awk... (4 Replies)
Discussion started by: dsp80
4 Replies
UNROFF(1) General Commands Manual UNROFF(1)
NAME
unroff - convert troff documents to plain text
SYNTAX
unroff [ -E ] [ -J ] [ -8 ] [ -mxx ] [ file ... ]
DESCRIPTION
unroff processes documents written to be formatted with troff (or nroff, or any of the other *roff variants) and converts them to plain
text. This is similar to what deroff does, but the result is sometimes better than deroff output.
Optional flags may be given to modify the operation of unroff, as follows:
-E Echo input tokens as they are read. Useful mainly for debugging.
-J Join output lines that would be part of a single paragraph so they form a single output line. This is useful if you plan to move
the resulting output into a document formatter that treats paragraphs as a single line. The default is to do line wrapping accord-
ing to the line length specified in the input document.
-8 Write 8-bit ISO Latin-1 (ISO 8859-1) characters. This option may be useful for producing output intended to be viewed on devices
capable of 8-bit character display. Without this option, 8-bit Latin-1 characters will generall appear in the output as
``[[name]]'' where ``name'' is the troffcvt internal name for the character, e.g., ``[[Aacute]]''. For some of these characters, an
ASCII approximation will be used if something reasonably close is available.
-mxx Specify macro package, usually -man, -me, -mm, or -ms.
DIAGNOSTICS
line length clipped to nnn chars. A very long line length was requested, so long that it would likely result in output line assembly buf-
fer overflow. The length is clipped to prevent this.
output buffer capacity exceeded. This means some line is so long that it couldn't be collected in the output line assembly buffer. Most
likely this signals a bug in tc2text, since the length is supposed to be kept within reasonable bounds (see previous paragraph).
SEE ALSO
troffcvt(1), tc2text(1)
WHO-TO-BLAME
Paul DuBois, dubois@primate.wisc.edu.
BUGS
unroff doesn't do so well with tables, particularly tables with multiple-line cells. Table centering isn't handled.
UNROFF(1)