02-12-2020
OK what have you done so far?
As we agree the first code you gave in #1 wont take you very far...
Passing numbers, OK but what if its not the case? like char or words, what happens?
Writing a script that accepts arguments is something nice, but unless its for your own usage, it should be fool proof and properly written Like :
No argument -> display usage
Testing the argument values etc...
Last edited by Neo; 02-12-2020 at 11:58 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies
2. Shell Programming and Scripting
using sed to replace a specific string on a specific line number using variables
this is where i am at
grep -v WARNING output | grep -v spawn | grep -v Passphrase | grep -v Authentication | grep -v '/sbin/tfadmin netguard -C'| grep -v 'NETWORK>' >> output.clean
grep -n Destination... (2 Replies)
Discussion started by: todd.cutting
2 Replies
3. Shell Programming and Scripting
I have a two files containing numbers like below. First one contains one number on each line, the other is a table of numbers, each separated by a space. There are the same number of lines in each file.
I want to take each number in the row of the table and find the difference from the... (12 Replies)
Discussion started by: kristinu
12 Replies
4. Shell Programming and Scripting
Hi,
I have a menu of around 10 lines with options.
I want to display it in bottom right corner of screen for better display.
I can do it with clear screen. But I don't want to use it, because it will clear the existing text. After one choice from menu is executed, the menu should just place... (3 Replies)
Discussion started by: som.nitk
3 Replies
5. Shell Programming and Scripting
Hi ,
1)i want to display specific line number using tail command.
e.g. display 10 line from end.
Please help...
2)Want to display line 10 to 15 (from end)using tail command) (2 Replies)
Discussion started by: vivek1489
2 Replies
6. Shell Programming and Scripting
This is Input - starts with Storage Group Name and ends with Shareable and the loop continues all I need is Storage group name and Alu numbers in the below output format requested.
Storage Group Name: abcd
Storage Group UID: 00:00:000:00:0:0:0
HBA/SP Pairs:
HBA UID ... (6 Replies)
Discussion started by: maddysa
6 Replies
7. UNIX and Linux Applications
Hi,
I'm trying to figure out a way to find which line in my file.txt with IP addresses:
192.168.0.1
192.178.0.2
etc...
returns specific result when I execute command affecting all lines.
For example when I run:
for line in `cat file.txt`;
do
snmpget $line
done
it displays the... (5 Replies)
Discussion started by: svetoslav_sj
5 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:
What single command line would you enter to get the following output?
8140 drwxr-xr-x 9 root bin 18 Jan 20... (6 Replies)
Discussion started by: dasboot
6 Replies
9. Shell Programming and Scripting
Hi All,
I've a file like this..
Sheet1
a,1
a,2
a,3
a,4
a,5
Sheet2
a,6
a,7
a,8
a,9
a,10
Sheet3
a,11
a,12
a,13 (7 Replies)
Discussion started by: manab86
7 Replies
10. Shell Programming and Scripting
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies
LEARN ABOUT DEBIAN
mensis
MENSIS(1) General Commands Manual MENSIS(1)
NAME
mensis - To or for, by with or from TrueType tables
SYNOPSIS
mensis [-cmap maptype] [-depth pixeld] [-display str] [-help] [-keyboard ktype] [-nosplash [-script file] [-sync [-usage] [-vc vclass]
[-version] fontfile ...
DESCRIPTION
The program mensis allows you to examine and modify some of the tables in a truetype or opentype font.
If the argument list contains a font file name (or several), pfaedit opens a table view window for each font displaying all the tables in
that font In the absence of options or arguments, the program opens a file-picker window, allowing you to browse your disk to find a font
file.
This manual page is intended only as a rudimentary overview; see the HTML Users Manual for more complete information. http://men-
sis.sourceforge.net/
OPTIONS
-cmap maptype
Employ the specified method to control 8-bit colormaps, where maptype assumes one of these three values:
current
Attempt to allocate colors in the current (shared) colormap. The program will likely not find everything it requires.
copy Allocate what can be allocated, then copy the current colormap; it can thus make use of cells other programs are using.
private
Create a new colormap and fill it with the required colors.
-depth pixeld
Attempt to employ a visual that matches the specified pixel depth, pixeld.
-display str
Employ the X display specified by the string str (for example: localhost:0).
-help Display the usage description and start a web client displaying the online documentation.
-keyboard ktype
Alter the displayed menus to employ modifier keys appropriate to the specified keyboard type, where ktype assumes one of the follow-
ing four values:
ibm IBM PC type keyboard.
mac Apple Macintosh keyboard.
sun Sun workstation keyboard.
ppc Macintosh keyboard, but on a system running SuSe linux (the mappings differ from those used under MacOS X).
-nosplash
Suppress display of the splash screen.
-script file
Execute the script named file. Does not open the X display. This must be the first argument passed to mensis. Any other arguments
are handled by the scriptfile itself. Any other command line arguments will be passed to the script. The program contains a com-
mand interpreter which allows access to most but not all of its interactive features. If a scriptfile is executable, and if its
first line contains the string "mensis", then the argument -script may be omitted. This means that mensis can be used as an inter-
preter.
-sync Make X synchronous. Used primarily for debugging, this option slows X down.
-usage Display the usage description.
-vc vclass
Attempt to use a visual that matches the class, vclass, specified as either the name of a visual class or an integer enumerating a
visual class.
-version
Display the current version (a six digit string containing the date stamp of the source files).
ENVIRONMENT
If any of the following environment variables exist, they are used:
BROWSER
Specifies the name of a browser program for examining documentation.
MENSIS_VERBOSE
Turns on verbose mode in scripting. Each statement is printed as it is executed.
FILES
/usr/local/share/mensis/*.ui
translations for the user interface
/usr/local/share/doc/mensis/*.html
optional location for online documentation.
SEE ALSO
pfaedit(1)
The HTML version of the mensis manual, available online at:
http://mensis.sourceforge.net/.
AUTHOR
Copyright (C) 2001-2003 by George Williams (gww@silcom.com).
BUGS
Undoubtedly many, but unknown and ever changing. See
http://mensis.sourceforge.net/#known-bugs for a current list.
13 October 2003 MENSIS(1)