I'm not sure on your question, but your code is a little confusing with all the quotes and the sub-process in $(...). I think that the decision for true && is based on the output of the echo -n -e "OS Archi..... statement rather thatn the result of the sub-process.
I think you are trying to make a decision based on the output of arch | grep .... so perhaps the following would be more suitable:-
There will be other perhaps neater ways to do this, but this is more explicit to me; make the decision and set your message then have one output statement to show the whole thing (copied to the log)
Does that help, or have I missed the point entirely?
Kind regards,
Robin.
Last edited by rbatte1; 07-25-2019 at 07:18 AM..
Reason: Missed a closing quote and added braces round variable name
Keeping in mind that I'm relatively comfortable with programming in general but very new to unix and korn/bourne shell scripts..
I'm using awk on a CSV file, and then performing calculations and operations on specific fields within specific records. The CSV file I'm working with has about 600... (2 Replies)
Is it possible to make function variables local?
I mean for example, I have a script variable 'name' and in function I have declared variable 'name'
I need to have script's 'name' have the same value as it was before calling the function with the same declaration.
The way to preserve a... (5 Replies)
Hi,
I have a base class and derived a class from the base class, i want to print & read the data for the object created for the derived class,so i have overloaded both the << and >> operators and also have done the foward declaration.
Below is the code snippet,
#include <iostream>
class... (3 Replies)
I use a simple script to do some quantum calculations with gaussian package. the script as follows
#!/bin/sh
#put a gaussian input file into a new folder in the same name
#and submit this new job
for i in *.gjf
do
FN=$( echo $i | sed 's/.gjf//')
mkdir $FN
mv... (1 Reply)
I wrote the following Makefile:
dirs := a b c d
files := $(foreach dir,$(dirs),$(wildcard $(dir)/*))
.PHONY: all
all:
touch $(files)
The first two lines are taken from GNU make tutorial, Section 8.5 The foreach Function. I would expect the recipe
touch $(files)
to be... (2 Replies)
Greetings,
I m wondering if it's possible do do the following :
I have a simple function called "FindMoveDelete" which does the following :
FindMoveDelete()
{
find . -iname "$FILENAME*.ext" -exec mv {} "$PATH/$VAR" \; &&
find . -maxdepth 1 -type d -iname "$FILENAME*" -exec rm -rf {}... (6 Replies)
Hello,
I was trying to understand more on strtok_r() function with following code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* *From http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=strtok_r
A FreeBSD man pages * */
int main()
{
char string1;
char *sep =... (8 Replies)
Hi,
If I declare a function inside another function, it overwrites any previously declared function with the same name. This is NOT what I want.
Example:
#!/bin/bash
_test() { echo test; }
_myf() {
# I'm using the same name as the other function.
_test() { echo local test; }... (8 Replies)
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
LEARN ABOUT DEBIAN
gen_keymap
GEN_KEYMAP(1) Ubuntu General Commands Manual GEN_KEYMAP(1)NAME
gen_keymap -- generate a keyboard map decision tree
SYNOPSIS
gen_keymap list ...
DESCRIPTION
gen_keymap generates a decision tree from a set of keyboard maps which can be used to help a user decide which keyboard map to use. The pro-
gram using the decision tree typically asks the user to press some keys; at each step, it examines the returned keycode and uses it to prune
the list of possible keyboard maps until there is only one left.
OPTIONS --version
Show program's version number and exit.
-?, --help
Show help text.
-v, --verbose
Be more verbose.
-mMINLEN, --minlen=MINLEN
Too-short keymaps are skipped (default: 30 entries).
-g, --graph
Generate a hopefully-nice-looking .dot file.
--maps
Print the to-be-processed keymaps
-i, --installer
Input files are in d-i map form.
-IDIRS, --inc=DIRS, --include=DIRS
Add a directory to the search path.
-oFILENAME, --output=FILENAME
Set output file (default: stdout).
-fFILTER, --filter=FILTER
Include only the branches leading to these keymaps.
-uUSEONLY, --useonly=USEONLY
Start generating the tree based only on these keymaps. (The difference between --filter and --useonly is that the former generates the
whole tree and then prunes it, while the latter only generates a reduced tree to begin with. This may have implications for perfor-
mance on large trees.)
-sSKIP, --skip=SKIP
Keymaps to skip.
-t, --test
Test the generated maps.
--interactive
Ask user to choose among indistinguishable keymaps.
AUTHORS
gen_keymap was written by Matthias Urlichs <smurf@debian.org>. This manual page was written by Colin Watson <cjwatson@ubuntu.com>.
Ubuntu September 5, 2006 Ubuntu