08-28-2012
thanks for all of the suggestions/help
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I understand how to use a variable in a sed command, but for the life of me I can't get the output into a variable.
I'm making a general function to replace part of a filename with a different string, so:
>>myscript this that
would change:
this_file001.txt to that_file001.txt and... (11 Replies)
Discussion started by: donflamenco
11 Replies
2. Shell Programming and Scripting
i'm on a Mac running BSD unix.
i have a script in which i ask the user to input the name of a mounted volume. i then call SED to substitute backslashes and spaces in place of the spaces. that looks like this:
echo "Enter the name of the volume"
read Volume
echo "You've chosen \"$Volume\""... (7 Replies)
Discussion started by: hungryd
7 Replies
3. Shell Programming and Scripting
Hi All,
Hope someone can advise here as I have been struggling to find a syntax that works here. I have tried a stack of combination I have seed in the forums but I think because I have needed to use "" and `` in the statments another method is found.
I am reading in lines with the following... (1 Reply)
Discussion started by: nkwilliams
1 Replies
4. Shell Programming and Scripting
Hi,
If I want my script to send a mail to multiple recipients I can do the following:
if
then
echo $err_string1 | mailx -s "UAT CPU ALERT" 1@email.com
echo $err_string1 | mailx -s "UAT CPU ALERT" 2@email.com
fi
Can this also be done something like:
... (1 Reply)
Discussion started by: runnerpaul
1 Replies
5. UNIX for Dummies Questions & Answers
I want to append matched output and cat the results into an variable. but I've been running into problems. sed is printing result on to screen instead of appending the output to $CAPTURE. I'm stumped...how should i fix this?
contents of $TEST
10.0.0.1
10.0.0.2
10.0.0.3
10.0.0.4
expected... (5 Replies)
Discussion started by: jazzaddict
5 Replies
6. Shell Programming and Scripting
Hi,
I'm new here so I want to say hello to everyone first!
I searched google and this forum for a similar problem, but wasn't successful
#! /bin/bash
I'm trying to output (echo) n lines of a text file to the screen (later into another file).
But I have problem with the sed command, it won't... (1 Reply)
Discussion started by: studiologe
1 Replies
7. Shell Programming and Scripting
Hi,
I have a problem with passing a echo output into a variable in bash
file='1990.tar'
NAME='echo $file | cut -d '.' -f1';
echo $NAME
the result is
echo $file | cut -d . -f1
however with this one,#!/bin/bash
file='1990.tar'
echo $file | cut -d '.' -f1
the result is what I... (2 Replies)
Discussion started by: 1988PF
2 Replies
8. Shell Programming and Scripting
I am trying to import a sqlplus output into a shell variable but it doesnt seem to be working.
set -x
export DEPENDENT_CR_NO=`sqlplus -s /nolog <<EOF
conn username/passwd
set heading off
select dependency from custom_patches where patch_name='PATCH.zip';
exit;
EOF`
echo $DEPENDENT_CR_NO
... (2 Replies)
Discussion started by: beginer314
2 Replies
9. Shell Programming and Scripting
Hi, I have the following command that parses an xml file to read a node <port>'s value. Hoever the output comes with spaces.
My requirement is to trim the spaces around the value and assign to a variable.
sed -n 's|<port>\(.*\)</port>|\1|p' ../cfg.xml
How do I go about it? (6 Replies)
Discussion started by: sai2013
6 Replies
10. Shell Programming and Scripting
Stumped with the formatting of the awk output when used with variables, e.g.:
awk -F, 'BEGIN {OFS=","} print {$2,$3,$4}' $infile1
produces the desired output (with rows), but when echoing the variable below, the output is one continuous line
var1=$(awk -F, 'BEGIN {OFS=","} print... (4 Replies)
Discussion started by: ux4me
4 Replies
LEARN ABOUT PHP
pspell_new
PSPELL_NEW(3) 1 PSPELL_NEW(3)
pspell_new - Load a new dictionary
SYNOPSIS
int pspell_new (string $language, [string $spelling], [string $jargon], [string $encoding], [int $mode])
DESCRIPTION
pspell_new(3) opens up a new dictionary and returns the dictionary link identifier for use in other pspell functions.
For more information and examples, check out inline manual pspell website:http://aspell.net/.
PARAMETERS
o $language
- The language parameter is the language code which consists of the two letter ISO 639 language code and an optional two letter
ISO 3166 country code after a dash or underscore.
o $spelling
- The spelling parameter is the requested spelling for languages with more than one spelling such as English. Known values are
'american', 'british', and 'canadian'.
o $jargon
- The jargon parameter contains extra information to distinguish two different words lists that have the same language and spell-
ing parameters.
o $encoding
- The encoding parameter is the encoding that words are expected to be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r',
'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned 32'. This parameter is largely untested, so be careful when using.
o $mode
- The mode parameter is the mode in which spellchecker will work. There are several modes available:
o PSPELL_FAST - Fast mode (least number of suggestions)
o PSPELL_NORMAL - Normal mode (more suggestions)
o PSPELL_BAD_SPELLERS - Slow mode (a lot of suggestions)
o PSPELL_RUN_TOGETHER - Consider run-together words as legal compounds. That is, "thecat" will be a legal compound, although
there should be a space between the two words. Changing this setting only affects the results returned by pspell_check(3);
pspell_suggest(3) will still return suggestions.
Mode is a bitmask constructed from different constants listed above. However, PSPELL_FAST, PSPELL_NORMAL and PSPELL_BAD_SPELLERS
are mutually exclusive, so you should select only one of them.
RETURN VALUES
Returns the dictionary link identifier on success or FALSE on failure.
EXAMPLES
Example #1
pspell_new(3)
<?php
$pspell_link = pspell_new("en", "", "", "",
(PSPELL_FAST|PSPELL_RUN_TOGETHER));
?>
PHP Documentation Group PSPELL_NEW(3)