Sponsored Content
Full Discussion: Grandpa returning to UNIX
Top Forums UNIX for Beginners Questions & Answers Grandpa returning to UNIX Post 303025863 by fossiili on Wednesday 14th of November 2018 03:58:48 AM
Old 11-14-2018
Oh no ... It was not the command cp the one I recollected. It must have been dd Smilie
 

10 More Discussions You Might Find Interesting

1. Programming

Returning Strings from C program to Unix shell script

Hi, Iam calling a C program from a Unix shell script. The (C) program reads encrypted username/password from a text file , decrypts and returns the decrypted string. Is there any way i can return the decrypted string to Unix shell program. My shell script uses the output of the program to... (11 Replies)
Discussion started by: satguyz
11 Replies

2. UNIX for Advanced & Expert Users

pclose returning -1

Hi all, In my application i am trying to select some text & then give it to print. for this i am opening a stream using popen & then later closing using pclose. Now this is working fine in my environment (solaris) but the pclose function is failing at my clients m/c. Even though print is... (3 Replies)
Discussion started by: nimishm123
3 Replies

3. Programming

Returning Strings from C program to Unix shell script

Hi, I'm having a requirement where I need to call a C program from a shell script and return the value from the C program to shell script. I refered a thread in this forum. But using that command in the code, it is throwing an error clear_text_password=$(get_password) Error: bash:... (24 Replies)
Discussion started by: venkatesh_sasi
24 Replies

4. Shell Programming and Scripting

returning from a function

Hi all, I am very new to BASH shell programming. I need to return an integer from a function to the caller function. I did this: but it keeps giving me wrong return: Can someone help me out here, please? Thanks (2 Replies)
Discussion started by: alirezan
2 Replies

5. Red Hat

ps-eo returning wrong value

Hi Need some help, bit of a noobie here. This command work perfectly with unix. returns a value of 1 which is what i want. ps -eo user,comm |grep -v grep |grep -c /path to file When i run the same command on a linux server it returns a value of 0., something maybe wrong with the command.... (4 Replies)
Discussion started by: wneutt
4 Replies

6. Shell Programming and Scripting

how to capture oracle function returning 2 values in unix

i have an oracle function which returns two values, one is the error message if the function encounters anything and another one which returns a number i need to capture both and pass it on to unix shell script how to do it (2 Replies)
Discussion started by: trichyselva
2 Replies

7. Shell Programming and Scripting

Returning -ve value in a pattern

Dear Friends, I need your help once more. I want to write a simple select as follows select amount from books where sr=1234 However, if value of "Amount" is negative then it should print it as follows. "3000-" and not as "-3000" Can you help me in this? Waiting for reply Anu. (2 Replies)
Discussion started by: anushree.a
2 Replies

8. Shell Programming and Scripting

Control from UNIX script is not returning to the Parent program

Hi All, My program flow is as below Windows batch -- > Cygwin batch --> zsh script There are multiple Cygwin batch scripts that are called from Windows batch file . But when i am executing the first cygwin batch script the control goes to the zsh file and executes and stoping from... (1 Reply)
Discussion started by: Hypesslearner
1 Replies

9. Shell Programming and Scripting

Control not returning from Sqlplus to calling UNIX shell script.

Hello All, I have a UNIX script which will prepare anonymous oracle pl/sql block in a temporary file in run time and passes this file to sqlplus as given below. cat > $v_Input_File 2>>$v_Log << EOF BEGIN EXECUTE IMMEDIATE 'ALTER SESSION FORCE PARALLEL DML PARALLEL 16'; EXECUTE... (1 Reply)
Discussion started by: vikas_trl
1 Replies

10. Shell Programming and Scripting

Control not returning from Sqlplus to calling UNIX shell script.

Hello All, I have exactly same issue @vikas_trl had in following link: https://www.unix.com/shell-programming-and-scripting/259854-control-not-returning-sqlplus-calling-unix-shell-script.html I wonder if he or somebody else could find the issue's cause or the solution. Any help would... (4 Replies)
Discussion started by: RicardoQ
4 Replies
Util(3pm)						User Contributed Perl Documentation						 Util(3pm)

NAME
Taint::Util - Test for and flip the taint flag without regex matches or "eval" SYNOPSIS
#!/usr/bin/env perl -T use Taint::Util; # eek! untaint $ENV{PATH}; # $sv now tainted under taint mode (-T) taint(my $sv = "hlagh"); # Untaint $sv again untaint $sv if tainted $sv; DESCRIPTION
Wraps perl's internal routines for checking and setting the taint flag and thus does not rely on regular expressions for untainting or odd tricks involving "eval" and "kill" for checking whether data is tainted, instead it checks and flips a flag on the scalar in-place. FUNCTIONS
tainted Returns a boolean indicating whether a scalar is tainted. Always false when not under taint mode. taint & untaint Taints or untaints given values, arrays will be flattened and their elements tainted, likewise with the values of hashes (keys can't be tainted, see perlsec). Returns no value (which evaluates to false). untaint(%ENV); # Untaints the environment taint(my @hlagh = qw(a o e u)); # elements of @hlagh now tainted References (being scalars) can also be tainted, a stringified reference reference raises an error where a tainted scalar would: taint(my $ar = @hlagh); system echo => $ar; # err: Insecure dependency in system This feature is used by perl internally to taint the blessed object "qr//" stringifies to. taint(my $str = "oh noes"); my $re = qr/$str/; system echo => $re; # err: Insecure dependency in system This does not mean that tainted blessed objects with overloaded stringification via overload need return a tainted object since those objects may return a non-tainted scalar when stringified (see t/usage.t for an example). The internal handling of "qr//" however ensures that this holds true. File handles can also be tainted, but this is pretty useless as the handle itself and not lines retrieved from it will be tainted, see the next section for details. taint(*DATA); # *DATA tainted my $ln = <DATA>; # $ln not tainted About tainting in Perl Since this module is a low level interface that directly exposes the internal "SvTAINTED*" functions it also presents new and exciting ways for shooting yourself in the foot. Tainting in Perl was always meant to be used for potentially hostile external data passed to the program. Perl is passed a soup of strings from the outside; it never receives any complex datatypes directly. For instance, you might get tainted hash keys in %ENV or tainted strings from *STDIN, but you'll never get a tainted Hash reference or a tainted subroutine. Internally, the perl compiler sets the taint flag on external data in a select few functions mainly having to do with IO and string operations. For example, the "ucfirst" function will manually set a tainted flag on its newly created string depending on whether the original was tainted or not. However, since Taint::Util is exposing some of perl's guts, things get more complex. Internally, tainting is implemented via perl's MAGIC facility, which allows you to attach attach magic to any scalar, but since perl doesn't liberally taint scalars it's there to back you up if you do. You can "taint(*DATA)" and "tainted(*DATA)" will subsequently be true but if you read from the filehandle via "<DATA>" you'll get untainted data back. As you might have guessed this is completely useless. The test file t/usage.t highlights some of these edge cases. Back in the real world, the only reason tainting makes sense is because perl will back you up when you use it, e.g. it will slap your hand if you try to pass a tainted value to system(). If you taint references, perl doesn't offer that protection, because it doesn't know anything about tainted references since it would never create one. The things that do work like the stringification of "taint($t = [])" (i.e. "ARRAY(0x11a5d48)") being tainted only work incidentally. But I'm not going to stop you. By all means, have at it! Just don't expect it to do anything more useful than warming up your computer. See RT #53988 <https://rt.cpan.org/Ticket/Display.html?id=53988> for the bug that inspired this section. EXPORTS
Exports "tainted", "taint" and "untaint" by default. Individual functions can be exported by specifying them in the "use" list, to export none use "()". HISTORY
I wrote this when implementing re::engine::Plugin so that someone writing a custom regex engine with it wouldn't have to rely on perl regexps for untainting capture variables, which would be a bit odd. SEE ALSO
perlsec AUTHOR
var Arnfjoer` Bjarmason <avar@cpan.org> LICENSE
Copyright 2007-2010 var Arnfjoer` Bjarmason. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2010-03-17 Util(3pm)
All times are GMT -4. The time now is 05:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy