Sponsored Content
Top Forums Shell Programming and Scripting Problem using grep in bash script Post 302565270 by errcricket on Monday 17th of October 2011 11:52:13 AM
Old 10-17-2011
Thank you otheus. Using your script from the command line works too. As for running the file from the command line...it does not work, but I suspect it has something to do with the execution path. Regardless, I think I am on the correct $Path to solving this problem. Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script (using find and grep)

I'm trying to make a simple search script but cannot get it right. The script should search for keywords inside files. Then return the file paths in a variable. (Each file path separated with \n). #!/bin/bash SEARCHQUERY="searchword1 searchword2 searchword3"; for WORD in $SEARCHQUERY do ... (6 Replies)
Discussion started by: limmer
6 Replies

2. Shell Programming and Scripting

Problem in bash script

I have written a script and I get error and I don't understand why. neededParameters=2 numOfParameters=0 correctNum=0 while getopts "s:l:" opt do case "$opt" in s) serviceName= $OPTARG #errorline 1 numOfParameters= $numOfParameters + 1 ;; l) ... (12 Replies)
Discussion started by: programAngel
12 Replies

3. Shell Programming and Scripting

Bash script - Grep

Hi, I am very new to bash scripting and I need to write a bash script that takes two arguments, a string and a file. The output should be each line which matches the string *from the beginning of the line*. For example, given a string "ANA" the line starting with "ANABEL" will be printed, but... (9 Replies)
Discussion started by: jboy
9 Replies

4. Shell Programming and Scripting

Help with grep and read function in a BASH Script

I'm putting together a script that will search my mail archives for emails that meet certain criteria and output the files to a text file. I can manually cat that text file and pipe it into sendmail and it will work (i.e. cat /pathtofile/foo.txt | sendmail -t me@company.com) My script sends... (7 Replies)
Discussion started by: binary-ninja
7 Replies

5. Shell Programming and Scripting

pipe to grep doesn't work in bash script

Hi, I'm trying to write a script that checks gvfs to see if a mount exists so I can run it from network-manager's status hooks. I thought I'd pipe the output of gvfs-mount -l to grep for the particular mounts I care about. When I do this in a bash script: cmnd="gvfs-mount -l | grep -i... (4 Replies)
Discussion started by: kcstrom
4 Replies

6. Shell Programming and Scripting

Problem with Bash Script.

Hi guys! I'm new to the forum and to the Bash coding scene. I have the following code paths=/test/a paths=/test/b keywords=\"*car*\" keywords=\"*food*\" for file in `find paths -type f -ctime -1 -name keywords -print 2>/dev/null` do #.... do stuff here for every $file found... (5 Replies)
Discussion started by: RedSpyder
5 Replies

7. UNIX for Dummies Questions & Answers

Problem with multiple grep in bash loop

Hello, I am trying to create a matrix of 0's and 1's depending on whether a gene and sample name are found in the same line in a file called results.txt. An example of the results.txt file is (tab-delimited): Sample1 Gene1 ## Gene2 ## Sample2 Gene2 ## Gene 4 ## Sample3 Gene3 ... (2 Replies)
Discussion started by: InfoSeeker2
2 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Grep in bash script

Hi Experts, I'm writing script to find out last files and its modified date - unfortunately am having problem with the below script. Error message: "grep: sales.txt: No such file or directory" #!/bin/bash var=1 var1=`awk '{n++} END {print n}' sales.txt` while ] do prod=$var... (6 Replies)
Discussion started by: parpaa
6 Replies

9. Shell Programming and Scripting

How to use grep in a loop using a bash script?

Dear all, Please help with the following. I have a file, let's call it data.txt, that has 3 columns and approx 700,000 lines, and looks like this: rs1234 A C rs1236 T G rs2345 G T Please use code tags as required by forum rules! I have a second file, called reference.txt,... (1 Reply)
Discussion started by: aberg
1 Replies

10. Shell Programming and Scripting

Is there a BASH script allowing me to grep specifics from /var/log/messages?

I am wondering if there is a script (if one exists, not confident in my own scripting ability) that is able to bring up specified information from the /var/log/messages. I need to show logged traffic on specific dates and times and protocols (ie. Show all insecure FTP traffic (most likely via... (13 Replies)
Discussion started by: vgplayer54
13 Replies
GLOBUS-K5(8)							  Globus Toolkit						      GLOBUS-K5(8)

NAME
globus-k5 - Acquire Kerberos Credentials for use with Grid Services SYNOPSIS
globus-k5 SERVICE-COMMAND [SERVICE-ARGS...] DESCRIPTION
The globus-k5 program is an authorization module used by the globus-gatekeeper program to acquire Kerberos 5 Credentials prior to executing a Grid Service. This may be accomplished by running kinit with a password stored in the globuskmap file, using the NCSA krb525 command, or the sslk5 command to use the X509 user proxy. The arguments passed to globus-k5 will not be used by it, but will be passed onto the job manager. The first parameter must be the path to the Grid Service. It is expected that the environment will contain the variables GLOBUSID and USER for the Grid and local POSIX user identities. This program is normally run as root, and will call seteuid() prior to executing the Grid Service. The parameters to use and the mapping for the globus to K5 user are located in the globuskmap file. FORMAT OF THE GLOBUSKMAP FILE
The globuskmap file is a line-oriented file which each line containing a command to run to acquire Kerberos 5 credentials for a Grid identity. Each line consists of an optionally-quoted GLOBUSID value followed by a command-line for running a process to acquire a Kerberos credential. For example: "/O=Example/OU=Grid/CN=Joe User" /usr/afsws/bin/klog -principal juser -password mypasswd -cell infn.it ENVIRONMENT
If the following variables affect the execution of globus-k5: GLOBUSKMAP Path to the globuskmap file. USER POSIX username that the service will run as. KRB5CCNAME Path to a Kerberos credential cache. GLOBUS_ID Grid identity to generate Kerberos credentials for. FILES
/etc/globuskmap Default file mapping Grid identities to Kerberos 5 principals. SEE ALSO
globus-k5(8), globus-job-manager(8) University of Chicago 01/06/2012 GLOBUS-K5(8)
All times are GMT -4. The time now is 02:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy