Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to grep variable in shell script? Post 303014857 by RudiC on Thursday 22nd of March 2018 02:44:40 AM
Old 03-22-2018
You have a leading space in d that doesn't seem to exist in your file.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep results to store in a shell variable

I have the results of a grep with -n store in a shell variable ie VAR=`grep -n -e 'PATTERN' file` How ever I am missing the line breaks in the variable , How do I store the resualts of grep with many lines in to a variables. I want the varable should be the sawmway as we do the grep grep... (3 Replies)
Discussion started by: jojan
3 Replies

2. Shell Programming and Scripting

How to return a value of a variable from shell script to perl script

HI , Is there any way to return a value of variable from shell to perl script. Code: === Perl file my $diff1=system("sh diff.sh"); my $diff2=system("sh diff1.sh"); I need exit status of below commands i.e 0 and 1 respectively. Since in both the cases diff is working so system... (3 Replies)
Discussion started by: srkelect
3 Replies

3. Shell Programming and Scripting

Shell script / Grep / Awk to variable and Loop

Hi, I have a text file with data in that I wish to extract, assign to a variable and process through a loop. Kind of the process that I am after: 1: Grep the text file for the values. Currently using: cat /root/test.txt | grep TESTING= | awk -F"=" '{ a = $2 } {print a}' | sort -u ... (0 Replies)
Discussion started by: Spoonless
0 Replies

4. Shell Programming and Scripting

assign awk's variable to shell script's variable?

Dear All, we have a command output which looks like : Total 200 queues in 30000 Kbytes and we're going to get "200" and "30000" for further process. currently, i'm using : numA=echo $OUTPUT | awk '{print $2}' numB=echo $OUTPUT | awk '{print $5}' my question is : can I use just one... (4 Replies)
Discussion started by: tiger2000
4 Replies

5. Shell Programming and Scripting

How to grep sql error in shell script and exit the script?

I need help in the following script. I want to grep the sql errors insert into the error table and exit the shell script if there is any error, otherwise keep running the scripts. Here is my script #!/bin/csh -f source .orapass set user = $USER set pass = $PASS cd /opt/data/scripts echo... (2 Replies)
Discussion started by: allinshell99
2 Replies

6. Shell Programming and Scripting

Issue with passing variable to Grep in a shell script

Hi, I'm trying to check if methods specified in a class have been added to the corrosponding interface. My code below is giving me the following errors: grep: function: No such file or directory grep: import($zipfile): No such file or directory grep: function: No such file or... (1 Reply)
Discussion started by: racshot65
1 Replies

7. Shell Programming and Scripting

Unable to pass shell script variable to awk command in same shell script

I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist. diff=$1$2.diff id=$2 new=new_$diff echo "My id is $1" echo "I want to sync for user account $id" ##awk command I am using is as below cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies

8. Shell Programming and Scripting

Variable not working in grep from script

Hi, If I hard code a value in the grep it works fine from script, when I use variable it doesn't work. On a seperate note, some lines (during testing) works fine from command line but not from scirpt. #!/bin/bash # Will fetch the (oldest - as ls will sort by name by default)Date in the... (7 Replies)
Discussion started by: krish.m
7 Replies

9. Shell Programming and Scripting

Shell script to pass the config file lines as variable on the respective called function on a script

I want to make a config file which contain all the paths. i want to read the config file line by line and pass as an argument on my below function. Replace all the path with reading config path line by line and pass in respective functions. how can i achieve that? Kindly guide. ... (6 Replies)
Discussion started by: sadique.manzar
6 Replies

10. UNIX for Beginners Questions & Answers

How can I assign awk's variable to shell script's variable?

I have the following script, and I want to assign the output ($10 and $5) from awk to N and L: grdinfo data.grd | awk '{print $10,$5}'| read N L output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Discussion started by: geomarine
8 Replies
Status Codes(3) 						 globus rls client						   Status Codes(3)

NAME
Status Codes - Defines #define GLOBUS_RLS_SUCCESS 0 #define GLOBUS_RLS_GLOBUSERR 1 #define GLOBUS_RLS_INVHANDLE 2 #define GLOBUS_RLS_BADURL 3 #define GLOBUS_RLS_NOMEMORY 4 #define GLOBUS_RLS_OVERFLOW 5 #define GLOBUS_RLS_BADARG 6 #define GLOBUS_RLS_PERM 7 #define GLOBUS_RLS_BADMETHOD 8 #define GLOBUS_RLS_INVSERVER 9 #define GLOBUS_RLS_MAPPING_NEXIST 10 #define GLOBUS_RLS_LFN_EXIST 11 #define GLOBUS_RLS_LFN_NEXIST 12 #define GLOBUS_RLS_PFN_EXIST 13 #define GLOBUS_RLS_PFN_NEXIST 14 #define GLOBUS_RLS_LRC_EXIST 15 #define GLOBUS_RLS_LRC_NEXIST 16 #define GLOBUS_RLS_DBERROR 17 #define GLOBUS_RLS_RLI_EXIST 18 #define GLOBUS_RLS_RLI_NEXIST 19 #define GLOBUS_RLS_MAPPING_EXIST 20 #define GLOBUS_RLS_INV_ATTR_TYPE 21 #define GLOBUS_RLS_ATTR_EXIST 22 #define GLOBUS_RLS_ATTR_NEXIST 23 #define GLOBUS_RLS_INV_OBJ_TYPE 24 #define GLOBUS_RLS_INV_ATTR_OP 25 #define GLOBUS_RLS_UNSUPPORTED 26 #define GLOBUS_RLS_TIMEOUT 27 #define GLOBUS_RLS_TOO_MANY_CONNECTIONS 28 #define GLOBUS_RLS_ATTR_VALUE_NEXIST 29 #define GLOBUS_RLS_ATTR_INUSE 30 Detailed Description All of the functions in the API that return status return it in a globus_result_t structure. Prior to version 2.0.0 an integer status was returned. The globus_result_t structure includes an integer 'type' which is set to one of the status codes defined below (the same values that were returned by earlier versions of the API). The function globus_rls_client_error_info() may be used to extract the status code and/or error message from a globus_result_t. GLOBUS_SUCCESS is returned when the operation was successful. Define Documentation #define GLOBUS_RLS_SUCCESS 0 Operation succeeded. #define GLOBUS_RLS_GLOBUSERR 1 An error was returned by the Globus I/O module. #define GLOBUS_RLS_INVHANDLE 2 The globus_rls_handle_t handle is invalid. #define GLOBUS_RLS_BADURL 3 The URL could not be parsed. #define GLOBUS_RLS_NOMEMORY 4 Out of memory. #define GLOBUS_RLS_OVERFLOW 5 A result was too large to fit in buffer. #define GLOBUS_RLS_BADARG 6 Bad argument (eg NULL where string pointer expected). #define GLOBUS_RLS_PERM 7 Client does not have permission for requested action. #define GLOBUS_RLS_BADMETHOD 8 RPC error, invalid method name sent to server. #define GLOBUS_RLS_INVSERVER 9 LRC request made to RLI server or vice versa. #define GLOBUS_RLS_MAPPING_NEXIST 10 LFN,PFN (LRC) or LFN,LRC (RLI) mapping doesn't exist. #define GLOBUS_RLS_LFN_EXIST 11 LFN already exists in LRC or RLI database. #define GLOBUS_RLS_LFN_NEXIST 12 LFN doesn't exist in LRC or RLI database. #define GLOBUS_RLS_PFN_EXIST 13 PFN already exists in LRC database. #define GLOBUS_RLS_PFN_NEXIST 14 PFN doesn't exist in LRC database. #define GLOBUS_RLS_LRC_EXIST 15 LRC already exists in LRC or RLI database. #define GLOBUS_RLS_LRC_NEXIST 16 LRC doesn't exist in RLI database. #define GLOBUS_RLS_DBERROR 17 Database error. #define GLOBUS_RLS_RLI_EXIST 18 RLI already exists in LRC database. #define GLOBUS_RLS_RLI_NEXIST 19 RLI doesn't exist in LRC. #define GLOBUS_RLS_MAPPING_EXIST 20 LFN,PFN (LRC) or LFN,LRC (RLI) mapping already exists. #define GLOBUS_RLS_INV_ATTR_TYPE 21 Invalid attribute type, see globus_rls_attr_type_t. #define GLOBUS_RLS_ATTR_EXIST 22 Attribute already exists. #define GLOBUS_RLS_ATTR_NEXIST 23 Attribute doesn't exist. #define GLOBUS_RLS_INV_OBJ_TYPE 24 Invalid object type, see globus_rls_obj_type_t. #define GLOBUS_RLS_INV_ATTR_OP 25 Invalid attribute search operator, see globus_rls_attr_op_t. #define GLOBUS_RLS_UNSUPPORTED 26 Operation is unsupported. #define GLOBUS_RLS_TIMEOUT 27 IO timeout. #define GLOBUS_RLS_TOO_MANY_CONNECTIONS 28 Too many connections. #define GLOBUS_RLS_ATTR_VALUE_NEXIST 29 Attribute with specified value not found. #define GLOBUS_RLS_ATTR_INUSE 30 Attribute in use by some object, can't be deleted. Author Generated automatically by Doxygen for globus rls client from the source code. Version 5.2 Wed Jan 25 2012 Status Codes(3)
All times are GMT -4. The time now is 01:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy