02-13-2012
It ought to work. Try ${STR:${VAR}:1}
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I would like to use sed to add "-" between the following string:
Value: 20060830
Result: 2006-08-30
Pls advice. Thx a lot
Victor (5 Replies)
Discussion started by: victorlung
5 Replies
2. Shell Programming and Scripting
Hello
would appreciate if somebody can post a bash script that checks if the first character of the given string is equal to, say, "a"
thnx in advance (2 Replies)
Discussion started by: ole111
2 Replies
3. Shell Programming and Scripting
How can I do this? Actually I have a file which contains a path
e.g.
/home/john/Music/hello.mp3
and I want to take only the filename (hello.mp3) So, I need to read the file from its end to its start till the character "/"
Is this possible?
Thanks, I am sure you'll not disappoint me here!
Oh,... (9 Replies)
Discussion started by: hakermania
9 Replies
4. Shell Programming and Scripting
In bash, how can one remove the last character of a string? In perl, the chop function would remove the last character. However, I do not know how to do the same job in bash.
Many thanks in advance. (12 Replies)
Discussion started by: LessNux
12 Replies
5. Shell Programming and Scripting
Hello,
I want to check whether string has only numeric characters. The following code doesn't work for me
#!/usr/local/bin/bash
if ]]; then
echo "true"
else
echo "False"
fi
# ./yyy '346'
False
# ./yyy 'aaa'
False
I'm searching for solution using character classes, not regex.... (5 Replies)
Discussion started by: urello
5 Replies
6. Shell Programming and Scripting
I am writing a bash script that will find all references to the “Well_List” in the “Comp_File”.
I am filtering a Well_List that contains the following:
TEST_WELL_01
TEST_WELL_02
TEST_WELL_11
TEST_WELL_22
GOV_WELL_1
GOV_WELL_201
PUB_WELL_57
PUB_WELL_82
.
.
Comparison... (5 Replies)
Discussion started by: petfyp
5 Replies
7. Shell Programming and Scripting
Hello.
I have a string variable named L_TEMP to test a very simple filter.
L_TEMP="50AwL.|KWp9jk"
I want to insert a non printable character between K and W.
I have try this :
linux-g65k:~ # a='50AwL.|K'
linux-g65k:~ # b='Wp9jk'
linux-g65k:~ # L_TEMP="$a$'\x07'$b"
linux-g65k:~ # echo... (6 Replies)
Discussion started by: jcdole
6 Replies
8. Shell Programming and Scripting
I am trying to make my script as simple as a possible but, I am not sure if the way I am approaching is necessarily the most efficient or effective it can be. What I am mainly trying to fix is a for loop to remove a string from the specified files and within this loop I am trying to copy the lines... (2 Replies)
Discussion started by: Allie_gastrator
2 Replies
9. Shell Programming and Scripting
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am new in bash scripting. In my work, I provide support to several users and when I connect to their computers I use the same admin and password, so I am trying to create a script that will only ask me for the IP address and then connect to the computer without having me to type the user... (5 Replies)
Discussion started by: arcoa05
5 Replies
MECAB(1) MeCab MECAB(1)
NAME
mecab - Yet Another Part-of-Speech and Morphological Analyzer
SYNOPSIS
mecab [options] files
DESCRIPTION
MeCab: Yet Another Part-of-Speech and Morphological Analyzer
Copyright(C) 2001-2008 Taku Kudo Copyright(C) 2004-2008 Nippon Telegraph and Telephone Corporation
-r, --rcfile=FILE
use FILE as resource file
-d, --dicdir=DIR
set DIR as a system dicdir
-u, --userdic=FILE
use FILE as a user dictionary
-l, --lattice-level=INT
lattice information level (default 0)
-D, --dictionary-info
show dictionary information and exit
-a, --all-morphs
output all morphs(default false)
-O, --output-format-type=TYPE
set output format type (wakati,none,...)
-p, --partial
partial parsing mode
-F, --node-format=STR
use STR as the user-defined node format
-U, --unk-format=STR
use STR as the user-defined unk format
-B, --bos-format=STR
use STR as the user-defined bos format
-E, --eos-format=STR
use STR as the user-defined eos format
-x, --unk-feature=STR
use STR as the feature for unknown word
-b, --input-buffer-size=INT
set input buffer size (default 8192)
-P, --dump-config
dump MeCab parameters
-M, --open-mutable-dictionary
open dictioanry with mutable mode (experimental)
-C, --allocate-sentence
allocate new memory for input sentence
-N, --nbest=INT
output N best results (default 1)
-t, --theta=FLOAT
set temparature parameter theta (default 0.75)
-c, --cost-factor=INT
set cost factor (default 700)
-o, --output=FILE
set the output file name
-v, --version
show the version and exit.
-h, --help
show this help and exit.
mecab of 0.98pre1 March 2009 MECAB(1)