Sponsored Content
Top Forums Shell Programming and Scripting scripting headache... loops & variables Post 98219 by vino on Tuesday 7th of February 2006 12:18:41 AM
Old 02-07-2006
Replace $(...) with `...`

` are the backticks.
 

10 More Discussions You Might Find Interesting

1. IP Networking

DHCP client & ipchains headache

Hi all, I upgraded my SUSE 6.1 to SUSE 7.1 and at once the following things won't work anymore: 1) My DHCP client is not able anymore to retrieve my IP address from the @home server. It times out all the time. If I use a fixed IP I can get on the net, so there is no physical problem. 2) I... (3 Replies)
Discussion started by: Micky
3 Replies

2. UNIX for Dummies Questions & Answers

Variables being worked on inside of loops

I have a while read loop that reads values inside of a file and then performs an expr operation on each. Everything works fine, the way it's supposed to but, once the loop is finished, I can not access the variable that I used inside of the loop (but that variable was created outside of the... (7 Replies)
Discussion started by: yongho
7 Replies

3. Shell Programming and Scripting

bash scripting: using multiple 'for loops'??

Hey guys, I'm kinda a noob at scripting. I am trying to create a script that uses multiple for loops with the lsiutility to monitor disk health on a system. The script runs, but it will continually echo an infinite number of LogVolumes when there are only 2 per virtual disk on my server. It's... (2 Replies)
Discussion started by: tank126
2 Replies

4. Shell Programming and Scripting

Nested while loops (ksh scripting)

You can use one while inside another? I made the following script (without really knowing if I can use two while) to get 3 numbers different from each other at random: num1=$(( $RANDOM % 10 )) num2=$num1 while do num2=$(( $RANDOM % 10 )) done num3=$num1 while do while do... (1 Reply)
Discussion started by: ale.dle
1 Replies

5. Shell Programming and Scripting

Problem in loops in shell scripting

Hi, #!/bin/ksh $v="" for ((i = 1 ; i <= 5 ; i++ )) do v="THerrFile_$i.err"; grep -i "$i:Error" $v >>oraerror_output.txt done My requirement is to dynamically create variable like THerrFile_1.err,THerrFile_2.err etc. where my grep needs... (5 Replies)
Discussion started by: sudhir_83k
5 Replies

6. Shell Programming and Scripting

For loops with multiple variables

Hi script gurus. I have need to know how to use for loop with multiple variable. Basically lets take for example /etc/passwd file has following entries The above cat command will basically first greps the real users that have email addresses then converts ':' to '+' then using cut... (4 Replies)
Discussion started by: sparcguy
4 Replies

7. Shell Programming and Scripting

while loops and variables under bash

Hi, This is probably going to be very simple but i came across something i can't quite explain. Here is the situation: i have a list of files, which i'd like to process one by one (get the size, make some tests, whatever) and generate some statistics using different variables. Something... (5 Replies)
Discussion started by: m69w
5 Replies

8. Shell Programming and Scripting

Two variables in output file name nested for loops

I am trying to use two nested for loops to process some files and then create a new file using both variables in the output file name. I have several files in this naming style: S1_L3_all_R1.fastq S1_L3_all_R2.fastq S1_L4_all_R1.fastq S1_L4_all_R2.fastq . . S1_L8_all_R1.fastq... (3 Replies)
Discussion started by: aminards
3 Replies

9. Shell Programming and Scripting

Unset variables in shell when it running two different loops

I have a script to start/stop/restart the tomcat application. When we run the script first time i.e stop/start it set all env variables(DISTRIB_ID,NAME,TOMCAT_CFG,....etc),but when we restart the tomcat it is running in the same shell.....I need to set the variables when i restart the tomcat(in the... (1 Reply)
Discussion started by: praveen265
1 Replies

10. UNIX for Dummies Questions & Answers

Loops & Variable

I am using this code: for e in {1..14} do awk '{gsub(/^.*GGGGGG|TTTTT.*$/,"",$0)} 1' $e.1 > ${e}.2 done However, in the second loop instead of GGGGGG|TTTTT, I should use AAAAAA|CCCCCC. For third loop CCAAAA|CCCCAA, so on and so forth. Is there any way to accomplish this without writing... (20 Replies)
Discussion started by: Xterra
20 Replies
RONN-FORMAT(7)							    Ronn Manual 						    RONN-FORMAT(7)

NAME
ronn-format - manual authoring format based on Markdown SYNOPSIS
name(1) -- short, single-sentence description ============================================= ## SYNOPSIS `name` [<optional>...] <flags> ## DESCRIPTION A normal paragraph. This can span multiple lines and is terminated with two or more line endings -- just like Markdown. Inline markup for `code`, `user input`, and **strong** are displayed boldface; <variable>, _emphasis_, *emphasis*, are displayed in italics (HTML) or underline (roff). Manual references like sh(1), markdown(7), roff(7), etc. are hyperlinked in HTML output. Link to sections like [STANDARDS][], [SEE ALSO][], or [WITH A DIFFERENT LINK TEXT][#SEE-ALSO]. Definition lists: * `-a`, `--argument`=[<value>]: One or more paragraphs describing the argument. * You can put whatever you *want* here, really: Nesting and paragraph spacing are respected. Frequently used sections: ## OPTIONS ## SYNTAX ## ENVIRONMENT ## RETURN VALUES ## STANDARDS ## SECURITY CONSIDERATIONS ## BUGS ## HISTORY ## AUTHOR ## COPYRIGHT ## SEE ALSO DESCRIPTION
The ronn(1) command converts text in a simple markup to UNIX manual pages. The syntax includes all Markdown formatting features, plus con- ventions for expressing the structure and various notations present in standard UNIX manpages. Not all roff(7) typesetting features can be expressed using ronn syntax. MANPAGE TITLE
Manpages have a name, section, and a one-line description. Files must start with a level one heading defining these attributes: ls(1) -- list directory contents ================================ Indicates that the manpage is named ls in manual section 1 ( SECTION HEADINGS
Man section headings are expressed with markdown level two headings. There are two syntaxes for level two headings. Hash prefix syntax: ## HEADING TEXT Dash underline syntax: HEADING TEXT ------------ Section headings should be all uppercase and may not contain inline markup. INLINE MARKUP
Manpages have a limited set of text formatting capabilities. There's basically boldface and italics (often displayed using underline). Ronn uses the following bits of markdown(7) to accomplish this: `backticks` (markdown compatible) Code, flags, commands, and noun-like things; typically displayed in in boldface. All text included within backticks is displayed literally; other inline markup is not processed. HTML output: <code>. **double-stars** (markdown compatible) Also displayed in boldface. Unlike backticks, inline markup is processed. HTML output: <strong>. <anglequotes> (non-compatible markdown extension) User-specified arguments, variables, or user input. Typically displayed with underline in roff output. HTML output: <var/>. _underbars_ (markdown compatible) Emphasis. May be used for literal option values. Typically displayed with underline in roff output. HTML output: <em>. Here is grep(1)'s DESCRIPTION section represented in ronn: `Grep` searches the named input <FILE> (or standard input if no files are named, or the file name `-` is given) for lines containing a match to the given <PATTERN>. By default, `grep` prints the matching lines. DEFINITION LISTS
The definition list syntax is compatible with markdown's unordered list syntax but requires that the first line of each list item be termi- nated with a colon An example definition list, taken from BSD test(1)'s DESCRIPTION section: The following primaries are used to construct expressions: * `-b` <file>: True if <file> exists and is a block special file. * `-c` <file>: True if _file_ exists and is a character special file. * `-d` <file>: True if file exists and is a directory. LINKS
All markdown(7) linking features are supported. Markdown reference-style links can be used to link to specific sections by name: ## SECTION 1 See the following section. ## SECTION 2 See [SECTION 1][] or [to put it another way][SECTION 1]. The anchor name would be #SECTION-1 and #SECTION-2. All non-word characters are removed and spaces are replaced by dashes. SEE ALSO
ronn(1), markdown(7), roff(7) Ronn 0.7.0 June 2010 RONN-FORMAT(7)
All times are GMT -4. The time now is 08:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy