You do not need to put date, ls, or any other COMMAND to put in quotes when executed in a terminal.
Just like this is enough:
To actualy work with them, it is suggest to echo them when encapsuled in a XY (what is this called again?).
As in:
Because if you just call:
It will fail, because its result is not a COMMAND.
Furthermore (but not relevant to the post), F14 is way end of life, 21 is coming out soon.
Hi
I'm writing a script and I've put #!/bin/bash as the first line so that I can just type my scripts name 'whodate' at PS1 instead of ./whodate. This has suddenly stopped working for me. It used to be the case that I could start a script with #!/bin/bash and it would work, but for this script... (2 Replies)
i have this code for a simple if loop:
#!/bin/bash
array="1 2 3 4 5"
array2="5 6 7 8 9"
if } -gt ${array} ]; then
echo "${array2} is greater than ${array}!!"
fi
the error is
./script8: line 9: [: too many arguments
./script8: line 9: [: too many arguments
./script8: line 9: [:... (10 Replies)
So I need a script that does the following:
If a certain user is logged in
Run `command`
Else
Echo “incorrect user”
This is my first stab...which doesn't work:
#!/bin/bash
X="user=`ls -l /dev/console | cut -d " " -f 4`"
Y="foobar"
echo $X
echo $Y (4 Replies)
Hi Friends,
I am presently migrating shell scripts writter in KSH to SH.I am stuck at this place and i am not able to find a work around:-
Let the script name is x.sh
Below are some of the codes in it...
export abc=hello
export abc=hi
export abc=how
When i am trying to compile the script ... (6 Replies)
Hello all,
I'm trying to substract 1 minute from the current date and take the hour and minute (for filename purpose).
1) If I want hour an minute from current time I can use:
timetmp=$(date +"%H:%M")
2) To substract 1 minute from current time I can use:
timetmp=$(date --date "$dte -1... (8 Replies)
Hi friends,
I have two files - input and commands
I want to read the input and replace a value in it with the contents in commands.
My script is like this.
Instead of printing the value in the commands file, it is simply printing $cmd in the output file.
Any pointers are highly... (1 Reply)
Hi, I am currently working on a Bash shell script that
- Downloads a webpage, in this case youtube.com
- Extracts Number of views, Extracts Title of video, Extracts User who made it, and lastly Duration. Then I have to Out put this into columns.
To me this sounds like crazyness. I'm very new... (6 Replies)
How to run several bash commands put in bash command line without needing and requiring a script file.
Because I'm actually a windows guy and new here so for illustration is sort of :
$ bash "echo ${PATH} & echo have a nice day!"
will do output, for example:... (4 Replies)
Ahoy friends.
Currently i got a bash script running to manage my minecraft servers.
All of them are stored in /home/minecraft_servers directory.
Using my script im able to start a server (e.g. ./minecraft start ftb_continuum) because server name and server name are the same.(e.g.... (2 Replies)
Discussion started by: Knogle
2 Replies
LEARN ABOUT MOJAVE
locale::codes::langfam
Locale::Codes::LangFam(3pm) Perl Programmers Reference Guide Locale::Codes::LangFam(3pm)NAME
Locale::Codes::LangFam - standard codes for language extension identification
SYNOPSIS
use Locale::Codes::LangFam;
$lext = code2langfam('apa'); # $lext gets 'Apache languages'
$code = langfam2code('Apache languages'); # $code gets 'apa'
@codes = all_langfam_codes();
@names = all_langfam_names();
DESCRIPTION
The "Locale::Codes::LangFam" module provides access to standard codes used for identifying language families, such as those as defined in
ISO 639-5.
Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 639-5
language family codes will be used.
SUPPORTED CODE SETS
There are several different code sets you can use for identifying language families. A code set may be specified using either a name, or a
constant that is automatically exported by this module.
For example, the two are equivalent:
$lext = code2langfam('apa','alpha');
$lext = code2langfam('apa',LOCALE_LANGFAM_ALPHA);
The codesets currently supported are:
alpha
This is the set of three-letter (lowercase) codes from ISO 639-5 such as 'apa' for Apache languages.
This is the default code set.
ROUTINES
code2langfam ( CODE [,CODESET] )
langfam2code ( NAME [,CODESET] )
langfam_code2code ( CODE ,CODESET ,CODESET2 )
all_langfam_codes ( [CODESET] )
all_langfam_names ( [CODESET] )
Locale::Codes::LangFam::rename_langfam ( CODE ,NEW_NAME [,CODESET] )
Locale::Codes::LangFam::add_langfam ( CODE ,NAME [,CODESET] )
Locale::Codes::LangFam::delete_langfam ( CODE [,CODESET] )
Locale::Codes::LangFam::add_langfam_alias ( NAME ,NEW_NAME )
Locale::Codes::LangFam::delete_langfam_alias ( NAME )
Locale::Codes::LangFam::rename_langfam_code ( CODE ,NEW_CODE [,CODESET] )
Locale::Codes::LangFam::add_langfam_code_alias ( CODE ,NEW_CODE [,CODESET] )
Locale::Codes::LangFam::delete_langfam_code_alias ( CODE [,CODESET] )
These routines are all documented in the Locale::Codes::API man page.
SEE ALSO
Locale::Codes
The Locale-Codes distribution.
Locale::Codes::API
The list of functions supported by this module.
http://www.loc.gov/standards/iso639-5/id.php
ISO 639-5 .
AUTHOR
See Locale::Codes for full author history.
Currently maintained by Sullivan Beck (sbeck@cpan.org).
COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.18.2 2013-11-04 Locale::Codes::LangFam(3pm)