12-31-2011
String variable question help plz
Dear all,
I have problem with string variable, I want to write script which do the following
read x
x="part1=part2"
then I want to sub the x variable for
x1="part1"
and
x2="part2"
Is that possible ??
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i.e configuration of C compiler :confused: (4 Replies)
Discussion started by: atiato
4 Replies
2. UNIX for Dummies Questions & Answers
I'm with FreeBSD 4.6.2, and i would like to know how to install this ports :
ftp://ftp.freebsd.org/pub/FreeBSD/branches/-current/ports/net/kmerlin
There's no .tgz so i can't do the pkg_add command. Can you please help me???
Thank You. :)
Erythro73 (6 Replies)
Discussion started by: Erythro73
6 Replies
3. Shell Programming and Scripting
Hi,
I have to submit my Assignment on 27th and am new to Unix. Please help me with this question. I have attached the questions
I would eagerly wait for response :( ..m really tensed :confused:
thanks
Monica
Email removed (1 Reply)
Discussion started by: monicajogi80
1 Replies
4. Shell Programming and Scripting
#!/usr/bin/ksh
exec 0<property
while read newReceiveDir
do
if
then
sed -e 's//home/joshua/bodi/data/receive/{$newReceiveDir:25}/g/' mp_validate.sh >| mp_validate.sh
elif
then
sed -e 's//home/joshua/bodi/data/temp/{$newReceiveDir:22}/g/' mp_validate.sh >| mp_validate.sh ... (1 Reply)
Discussion started by: joshuaduan
1 Replies
5. Shell Programming and Scripting
Hi ,
I have below file with 13 columns. I need 2-13 columns seperated by comma and I want to append each row with a string "INSERT INTO xxx" in the begining as 1st column and then a variable "$node" and then $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13 and at the end another string " ; COMMIT;"
... (4 Replies)
Discussion started by: Vaddadi
4 Replies
6. Shell Programming and Scripting
2- Write a bash shell script filestatic. The script should examine the number files in directories given as arguments (parameters) to this script.
a. if one argument is given, the script should count and report the number of files in this directory. Only regular files should be counted, not... (1 Reply)
Discussion started by: tahseen_22334
1 Replies
7. Homework & Coursework Questions
2- Write a bash shell script filestatic. The script should examine the number files in directories given as arguments (parameters) to this script.
a. if one argument is given, the script should count and report the number of files in this directory. Only regular files should be counted, not... (1 Reply)
Discussion started by: tahseen_22334
1 Replies
8. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I am trying to to compare a string variable with a string literal inside a loop but keep getting the
./testifstructure.sh: line 6:
#!/bin/sh
BOOK_LIST="BOOK1 BOOK2"
for BOOK in ${BOOK_LIST}
do
if
then echo '1'
else
echo '2'
fi
done
Please use next... (1 Reply)
Discussion started by: daveu7
1 Replies
10. UNIX for Beginners Questions & Answers
Below is my ksh shell script where I need to check if variable fileprops is a subset of $1 argument.
echo "FILE PROPERTY: $fileprops"
echo "PARAMETER3: $1"
if ; then
echo "We are Good. $line FILE is found to be INTACT !! "
else
echo... (2 Replies)
Discussion started by: mohtashims
2 Replies
LEARN ABOUT PHP
rararchive.setallowbroken
RARARCHIVE.SETALLOWBROKEN(3) 1 RARARCHIVE.SETALLOWBROKEN(3)
RarArchive::setAllowBroken - Whether opening broken archives is allowed
Object oriented style (method):
SYNOPSIS
public bool RarArchive::setAllowBroken (bool $allow_broken)
DESCRIPTION
Procedural style:
bool rar_allow_broken_set (RarArchive $rarfile, bool $allow_broken)
This method defines whether broken archives can be read or all the operations that attempt to extract the archive entries will fail. Bro-
ken archives are archives for which no error is detected when the file is opened but an error occurs when reading the entries.
PARAMETERS
o $rarfile
- A RarArchive object, opened with rar_open(3).
o $allow_broken
- Whether to allow reading broken files ( TRUE) or not ( FALSE).
RETURN VALUES
Returns TRUE or FALSE on failure. It will only fail if the file has already been closed.
EXAMPLES
Example #1
Object oriented style
<?php
function retnull() { return null; }
$file = dirname(__FILE__) . "/multi_broken.part1.rar";
/* Third argument omits "volume not found" message */
$a = RarArchive::open($file, null, 'retnull');
$a->setAllowBroken(true);
foreach ($a->getEntries() as $e) {
echo "$e
";
}
var_dump(count($a));
?>
The above example will output something similar to:
RarEntry for file "file1.txt" (52b28202)
int(1)
Example #2
Procedural style
<?php
function retnull() { return null; }
$file = dirname(__FILE__) . "/multi_broken.part1.rar";
/* Third argument omits "volume not found" message */
$a = rar_open($file, null, 'retnull');
rar_allow_broken_set($a, true);
foreach (rar_list($a) as $e) {
echo "$e
";
}
var_dump(count($a));
?>
SEE ALSO
RarArchive::isBroken.
PHP Documentation Group RARARCHIVE.SETALLOWBROKEN(3)