Does anyone know of a way to mimic the up arrow/down arrow type bash behavior within a shell script?
Say I have a scripted menu, and would like to be able to up arrow to bring up the last X number of lines of user input?
Thanks to anybody with a suggestion. :) (0 Replies)
hi,
i have a script that runs on bash and would like to run it on a machine that has csh and bash. the default setting on that machine is csh. i dont want to change my code to run it with a csh shell. is there any way i can run the script (written in bash) on this machine? in other words is there... (3 Replies)
The block below isn't a surprise:$ ls
file1 file2 file3
$ x=*
$ echo $x
file1 file2 file3
$ echo '$x'
$x
$ echo "$x"
*
$But I found this block a bit bewildering:$ echo $x'
>'
*
$I'm wondering why substitution wasn't performed on the $x, since it was unquoted (as far as I can tell).... (5 Replies)
Hi all
I am relatively new to linux (specifically red hat). I have installed Fedora 13 on my machine and started playing with the terminal when i found a very strange behavior when typing a command that is not found:
the terminal does not prompt me back. In other words, i am logged as root (or... (4 Replies)
run_xfs_fsr is a xfs filesystem maintenance script designed to run under cron. The system is a home theater personal computer running mythbuntu 10.10, and is accessed remotely for these tests. cron runs a script, (xfs_fsr.sh) at 02:30 that runs the subject script under BASH and sets the... (3 Replies)
I am trying to get my history in sync in multiple bash sections and things aren't working the way I expect.
Desired behavior, hitting esc-K in all bash sessions (same userid and machine) will use the same history.
Observed behavior: Esc-k shows the history of the current session, rather than... (8 Replies)
# check host value regex='^(||1|2|25)(\.(||1|2|25)){3}$' if ')" != "" ]; then if ]; then echo host $host not found exit 4 fi elif ]; then echo $host is an invalid host address exit 5 fi
espeacailly the top regex part?
---------- Post updated at 06:58 PM ---------- Previous update was... (1 Reply)
Good Morning
I think there may be something I dont understand fully.
The following code works well, but I dont like the set domen method.
#!/bin/bash
#
domen="y"
while
do
echo " M A I N - M E N U"
echo "1. Contents of /etc/passwd"
echo "2. List of users currently logged"
echo... (10 Replies)
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed ? Is there any way to get the script names for the process command ?
--- Post updated at 08:39 AM ---
in KSH (Korn Shell), my command output shows the script names but when run in the Bash Shell... (3 Replies)
Discussion started by: i4ismail
3 Replies
LEARN ABOUT DEBIAN
tm::serializable::jtm
TM::Serializable::JTM(3pm) User Contributed Perl Documentation TM::Serializable::JTM(3pm)NAME
TM::Serializable::JTM - Topic Maps, trait for reading/writing JSON Topic Map instances.
SYNOPSIS
# NOTE: this is not an end-user package,
# see TM::Materialized::JTM for common application patterns
# reading JSON/YAML:
my $tm=TM->new(...);
Class::Trait->apply($tm,"TM::Serializable::JTM");
$tm->deserialize($jsondata);
# writing JSON/YAML:
# ...a map $tm is instantiated somehow
Class::Trait->apply($tm,"TM::Serializable::JTM");
my $yamltext=$tm->serialize(format=>"yaml");
DESCRIPTION
This trait provides functionality for reading and writing Topic Maps in JTM (JSON Topic Map) format, as defined here:
<http://www.cerny-online.com/jtm/1.0/>.
Limitations:
o Variants are not supported by TM.
o Reification of basenames, occurrences and roles is not supported by TM.
o Multiple scopes are not supported by TM.
INTERFACE
Methods
deserialize
This method take a string and parses JTM content from it. It will raise an exception on any parsing error. On success, it will return
the map object.
The method understands one key/value parameter pair:
o format (choices: "json", "yaml")
This option controls whether the JTM is expected to be in JSON format or in YAML (which is a superset of JSON).
If no format parameter is given but the TM::Materialized::JTM trait is used, then the format is inherited from there; otherwise the
default is "json".
serialize
This method serializes the map object in JTM notation and returns the result as a string.
The method understands one key/value parameter pair:
o format (choices: "json", "yaml")
This option controls whether the JTM result should be created in the JSON format or in YAML (which is a superset of JSON).
If no format parameter is given but the TM::Materialized::JTM trait is used, then the format is inherited from there; otherwise the
default is "json".
SEE ALSO
TM, TM::Serializable
AUTHOR INFORMATION
Copyright 2010, Alexander Zangerl, All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://www.perl.com/perl/misc/Artistic.html
perl v5.10.1 2010-07-18 TM::Serializable::JTM(3pm)