Sponsored Content
Top Forums Shell Programming and Scripting Shell script to print "*" pattern Post 302422080 by Akshayr on Monday 17th of May 2010 11:35:03 AM
Old 05-17-2010
Shell script to print "*" pattern

Plz tel me how to print the following pattern using shell script??

Code:
   *
  ***
 *****
*******
 *****
  ***
   *

and
Code:
    *
*********
    *

Moderator's Comments:
Mod Comment Use code tags please, ty.

Last edited by Akshayr; 05-17-2010 at 12:45 PM.. Reason: code tags, reformatted and added * so it is symmetrical ;)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. UNIX for Dummies Questions & Answers

shell script to replace a line contain an unkown pattern starting with "aaa, bbb"

Hello, can any one help me on this? I have a /etc/exports file, it may contain a line (I can not remember exactly). Let me use an a sample file myfile.txt which contains a line * mypattern uncertain key words I want this line (with any possible combination of the uncertain key words to be... (2 Replies)
Discussion started by: Dingrong
2 Replies

3. Shell Programming and Scripting

In ksh shell command - Print "-ABC" is giving error

Hi Guys, while executing the following command : print "-ABC" is giving following error : ksh: print: bad option(s) I cannot use echo for some other reasons, so any other option ? (2 Replies)
Discussion started by: sagarjani
2 Replies

4. AIX

"too big" and "not enough memory" errors in shell script

Hi, This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these... (11 Replies)
Discussion started by: jerardfjay
11 Replies

5. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

6. Shell Programming and Scripting

How to print range of lines using sed when pattern has special character "["

Hi, My input has much more lines, but few of them are below pin(IDF) { direction : input; drc_pinsigtype : signal; pin(SELDIV6) { direction : input; drc_pinsigtype : ... (3 Replies)
Discussion started by: nehashine
3 Replies

7. Solaris

How to check "faulty" or "stalled" print queues - SAP systems?

Hi all, First off, sorry for a long post but I think I have no other option if I need to explain properly what I need help for. I need some advise on how best to check for "faulty" or "stalled/jammed' print queues. At the moment, I have three (3) application servers which also acts as print... (0 Replies)
Discussion started by: newbie_01
0 Replies

8. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

9. Shell Programming and Scripting

Why awk print is strange when I set FS = " " instead of FS = "\t"?

Look at the following data file(cou.data) which has four fields separated by tab. Four fields are country name, land area, population, continent where it belongs. As for country name or continent name which has two words, two words are separated by space. (Data are not accurately... (1 Reply)
Discussion started by: chihuyu
1 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
MOD-ACTIVE(8)						    InterNetNews Documentation						     MOD-ACTIVE(8)

NAME
mod-active - Batch processing of newsgroups creation and removal commands SYNOPSIS
mod-active [ctlinnd-command-file ...] DESCRIPTION
mod-active is a Perl script that updates the active file based on its input lines of ctlinnd "newgroup", "rmgroup" and "changegroup" commands. It pauses the server briefly while the existing active file is read and rewritten, which not only keeps innd from updating the active file but also locks against other instances of mod-active. The script must be run as the news user. The input to mod-active can come either from one or more ctlinnd-command-file files named on the command line, or from the standard input. Typically its input is the output from the docheckgroups or actsync commands. Every line which contains the string "ctlinnd newgroup", "ctlinnd rmgroup", or "ctlinnd changegroup", optionally preceded by whitespace and/or the path to ctlinnd, is noted for the update. Redundant commands, such as a newgroup directive for a group that already exists, are silently ignored. All other lines in the input are also silently ignored. After the new active file has been generated, the existing one is renamed to active.old and the new one is moved into place. The script then displays the differences between the two files. Any groups that were added to the active file are also added to the active.times file with the string "checkgroups-update". Please note that no syntax checking is performed on group names by mod-active. BUGS
Though innd is paused while mod-active works, it is not inconceivable that there could be a conflict if something else tries to update the active file during the relatively short time that mod-active is working. The two most realistic ways for this to happen are either by an administrator concurrently doing a manual ctlinnd command, or by innd receiving a control message, then mod-active pausing the server, then the control message handler script that innd forked running its own ctlinnd command while mod-active is working. Note that such scenarios are very unlikely to happen. HISTORY
Written by David C Lawrence <tale@isc.org> for InterNetNews. Converted to POD by Julien Elie. SEE ALSO
active(5), active.times(5), actsync(8), ctlinnd(8), docheckgroups(8), innd(8). INN 2.5.2 2009-05-21 MOD-ACTIVE(8)
All times are GMT -4. The time now is 08:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy