Sponsored Content
Full Discussion: Error with file test script
Top Forums UNIX for Beginners Questions & Answers Error with file test script Post 303026712 by Don Cragun on Sunday 2nd of December 2018 04:55:32 AM
Old 12-02-2018
Moderator's Comments:
Mod Comment This is a duplicate f the problem raised in the thread Error code with if statement. Please continue any discussion on this topic there.

This thread is closed.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Test File Reading & Validation using Shell script

Please help develop script for below requirement -------Sample file------------------------------- HSVSHOSTRECON 20090115011817BP DARMAR60064966247003504720000000000000000000066626000000000000133000003D003463001332 ... (14 Replies)
Discussion started by: niraj_bhatt
14 Replies

2. Shell Programming and Scripting

Test on string containing spacewhile test 1 -eq 1 do read a $a if test $a = quitC then break fi d

This is the code: while test 1 -eq 1 do read a $a if test $a = stop then break fi done I read a command on every loop an execute it. I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test. For example echo hello. Now the... (1 Reply)
Discussion started by: Max89
1 Replies

3. Shell Programming and Scripting

How to check weather a string is like test* or test* ot *test* in if condition

How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies

4. UNIX for Dummies Questions & Answers

error with TEST command

Hi, I have written a script to compare 2 string values.. below is the script.. it throws an error - ./compare_str.sh: test: amount1|amount2: unknown operator.. as both are string values, I am using a = operator in the test command. can some one help me figure out where the issue is?... (11 Replies)
Discussion started by: Vijay81
11 Replies

5. UNIX for Dummies Questions & Answers

Test: argument expected error in shell script

Hi, I am trying to write a small script that validates if there exist files that start with a pattern in a given directory. Below is the piece of my script: #!/usr/bin/ksh BTFDIR=/opt/ships/temp if then echo 'found' else echo 'not found' fi When I run this... (2 Replies)
Discussion started by: snvniranjanrao
2 Replies

6. Shell Programming and Scripting

if test in bash - can't see error

Hi, I have the following script under bash if ; then echo File $file_name Not Found else echo File $file_name Found fi I get the message even the file is found; there is only one file with that name in the directory I can't figure... (4 Replies)
Discussion started by: f_o_555
4 Replies

7. Shell Programming and Scripting

Shell script that check the argument passed to it and prints error if test condition is not met

I want to make a script that check for the argument passed to it and generates an error in case any character/string argument passed to it. I am using below code, but its not working. can anyone help. #!/bin/bash if ]; then echo 'An integer argument is passed to the script hence... (3 Replies)
Discussion started by: mukulverma2408
3 Replies

8. Shell Programming and Scripting

modify the test file by any script

Hi All the Helpers! I have a text file which looks like input.txt.I would request to please suggest me how can I make this file look like output.txt input.txt VOP 111 0 1 2 DEM 111 0 222 333 444 555 DEM 879 888 987 888 989 DEM 879 888 987 888 989 VOP 118 0 12 3 6... (7 Replies)
Discussion started by: Indra2011
7 Replies

9. Shell Programming and Scripting

Test file script - if evaluation failing

I have a following script to evaluate if file exist in the directory and then archive it. #!/bin/bash #master directory scriptdir="/flex/sh/interfaces" #change this path only - all other paths are connected with it filedir="/flex/interfaces" #change this path only - all other paths are... (3 Replies)
Discussion started by: viallos
3 Replies

10. Shell Programming and Scripting

If test script error: "Missing ]"

EDIT: Resolved Resolved by changing the first line to bash rather than csh, does bash and csh treat the brackets differently? Hi all, I'm doing to some basic stuff to teach myself "if" I've written the following: #!/bin/csh echo "This script checks for the test file" ... (1 Reply)
Discussion started by: Meshuggener
1 Replies
libapache2-mod-perl2-2.0.7::docs::api::APR::OS(3pm)	User Contributed Perl Documentation    libapache2-mod-perl2-2.0.7::docs::api::APR::OS(3pm)

NAME
APR::OS - Perl API for Platform-specific APR API Synopsis use APR::OS (); # get current thread id my $tid = APR::OS::current_thread_id(); Description "APR::OS" provides the Perl interface to platform-specific APR API. You should be extremely careful when relying on any of the API provided by this module, since they are no portable. So if you use those you application will be non-portable as well. API
"APR::OS" provides the following methods: "current_thread_id" Get the current thread ID $tid = APR::OS::current_thread_id(); ret: $tid ( integer ) under threaded MPMs returns the current thread ID, otherwise 0. since: 2.0.00 Example: use Apache2::MPM (); use APR::OS (); if (Apache2::MPM->is_threaded) { my $tid_obj = APR::OS::current_thread_id(); print "TID: $tid"; } else { print "PID: $$"; } See Also mod_perl 2.0 documentation. Copyright mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. Authors The mod_perl development team and numerous contributors. perl v5.14.2 2011-02-08 libapache2-mod-perl2-2.0.7::docs::api::APR::OS(3pm)
All times are GMT -4. The time now is 11:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy