Sponsored Content
Homework and Emergencies Homework & Coursework Questions bash error checking problems[solved] Post 302714227 by itkamaraj on Friday 12th of October 2012 02:10:01 AM
Old 10-12-2012
use double quotes, while using the grep

Code:
 
$ a=TEST
$ echo "TEST" | grep '$a'   #it will not give output
$ echo "TEST" | grep "$a" 
TEST

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

error checking in bash

Could someone please advise on a good way to implement error checking in a script? i am taking input from a file, iserting it's values into two commands and sending the output of each to seperate log files. i need to check those log files for for an occurance of 'error', stop the command if... (3 Replies)
Discussion started by: gubten
3 Replies

2. UNIX and Linux Applications

Kudda has successfully solved the downloading problems for numerous video web

The rise of Video web stimulates more intuitive video feeling of large people, and makes video downloading becomes a popular trend in web times, meanwhile, more and more downloading problems arises correspondingly, in which the first trouble is slow downloading speed and incomplete downloading. It... (0 Replies)
Discussion started by: angelstar
0 Replies

3. Shell Programming and Scripting

bash if loop for checking multiple parameters

Hello, I've got next problem: I want to examine at the beginning of a script in an if loop that: 1. Is there 4 parameters given 2. If first state is true then: is there switches -e and -d? 3. At the end, how can i indentify them as variebles regardlees to its order. I was thinking like... (2 Replies)
Discussion started by: szittyafergeteg
2 Replies

4. Shell Programming and Scripting

bash: checking file size -solved

Hello I have srv RHEL5, file system UTDM (EMC DiskXtender Unix/Linux File System Manager 3.5 & EMC Centera). it all works under the scheme: have disk is formatted with a file system UTDM, drive open network - NFS, it write data, then migrate the data in the repository - EMC Centera. There are... (0 Replies)
Discussion started by: moskovets
0 Replies

5. Shell Programming and Scripting

[Solved] <<EOF error checking

I am trying to check the return status of a command thats encapsulated in an <<EOF #!/bin/ksh set -x xxx() { set -x ls -lt /tmp/jdlkewjdlkewjdlkewjdlewjdlew<<EOT ret=$? EOT echo "ret=$ret" } >>$LOG 2>&1 LOG=/tmp/t2.out rm -rf $LOG echo "Starting process `date... (2 Replies)
Discussion started by: BeefStu
2 Replies

6. AIX

problems connecting with exceed (solved)

Hi, We have a user who cannot connect to the aix system anymore with hummingbird exceed. Our unix servers are aix 5.3. She is running windows xp and using hummingbird 12. She used to not have any problem, but now when she tries to use xstart she gets an error 'unable to connect to host using... (0 Replies)
Discussion started by: fwellers
0 Replies

7. HP-UX

Solved -- Problems with NIS Password Expiration...

HI. I was wondering if anyone can assist me in this. I have an HP-UX 11.31 server at work which keeps expiring my NIS password. I cannot log in unless I use root access. It worked before and I think some of the settings changed since then. My boss has told me that since we're taking some... (1 Reply)
Discussion started by: zixzix01
1 Replies

8. Shell Programming and Scripting

Multiple condition checking in bash

Hi All, I am trying to check if two variables have value assigned to it. i am doing it like if ] then echo "Please specify either single hostname or host file for the report" usage exit fi But its not working for it.Even i specify values for both variables it dont go... (6 Replies)
Discussion started by: kailash19
6 Replies

9. Shell Programming and Scripting

checking first argument for tag in bash script

I have a bash script where I pass an argument ./chris.bash "\argv Test" I want to detect if the user supplied \argv at the start of the argument (3 Replies)
Discussion started by: kristinu
3 Replies

10. Shell Programming and Scripting

Bash : Checking Large file for specific lines

Morning .. I have a file with approximately 1000 lines. I want to check that the file contains, for example, 100 lines. Something like whats given below is ugly. And even if I create a function I have to call it 100 times. I may need to look through multiple files at times. Is there a... (4 Replies)
Discussion started by: sumguy
4 Replies
std::hash< _Tp >(3cxx)													    std::hash< _Tp >(3cxx)

NAME
std::hash< _Tp > - SYNOPSIS
Inherits std::__hash_base< _Result, _Arg >. Public Types typedef _Arg argument_type typedef _Result result_type Public Member Functions size_t operator() (_Tp __val) const template<> size_t operator() (bool __val) const template<> size_t operator() (char __val) const template<> size_t operator() (signed char __val) const template<> size_t operator() (unsigned char __val) const template<> size_t operator() (wchar_t __val) const template<> size_t operator() (char16_t __val) const template<> size_t operator() (char32_t __val) const template<> size_t operator() (short __val) const template<> size_t operator() (int __val) const template<> size_t operator() (long __val) const template<> size_t operator() (long long __val) const template<> size_t operator() (unsigned short __val) const template<> size_t operator() (unsigned int __val) const template<> size_t operator() (unsigned long __val) const template<> size_t operator() (unsigned long long __val) const template<> size_t operator() (float __val) const template<> size_t operator() (double __val) const template<> size_t operator() (long double __val) const Detailed Description template<typename _Tp>struct std::hash< _Tp > Primary class template hash. Definition at line 58 of file functional_hash.h. Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ Tue Nov 27 2012 std::hash< _Tp >(3cxx)
All times are GMT -4. The time now is 08:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy