I've been stuck with this for a few days now , so I'm hoping someone out there might be kind enough to help me.
I need to do a "file exist" check with a variable in the file name. After that I need to do a line count on the file, and output its results to a txt file.
For simplicity/compliance reasons, I have simplified all my paths and file names. Also the txt file has already been created, hence the ">>" instead of ">"
Right now I'm getting a "bad substitute" error for the first line "if [ -f "/path/File_${CUR_DATE).rtf" ]; then" in the code below.
Code:
Please someone grace me with their expertise, it is very much appreciated!
Best regards,
Jay
Last edited by Franklin52; 10-24-2012 at 03:55 AM..
Reason: Please use code tags for data and code samples
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi,
I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
I'm trying to make use of mkdir(char *pathname, S_IRWXU) to create the directories.
but it only creates one directory at a time. so I have to separate the tokens for "/home/blah1/blah2/blah3" as "home blah1 blah2 blah3" using delimiter "/", but it is again hectic to create such directory... (8 Replies)
Hello fellow UNIX fans,
I'm running AIX 4.3 and getting an error message “cp: /a/file2.db: A file or directory in the path does not exist” when I run the following command:
cp /b/file.db /a/file2.db
It stops every time about 95% of the way through the copy process at 1,073,741,312 bits. ... (3 Replies)
Hi all,
First off, sorry for a long post but I think I have no other option if I need to explain properly what I need help for.
I need some advise on how best to check for "faulty" or "stalled/jammed' print queues. At the moment, I have three (3) application servers which also acts as print... (0 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hello,
I have been working on Awk/sed one liner which counts the number of occurrences of '|' in pipe separated lines of file and delete the line from files if count exceeds "17".
i.e need to get records having exact 17 pipe separated fields(no more or less)
currently i have below :
awk... (1 Reply)
Hi everybody,
I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o
My code:
#!/bin/sh
set -e
set -u
export IFS=
optl="Optl"
LOCSTORCLI="/opt/lsi/storcli/storcli"
($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT DEBIAN
grid-mapfile-check-consistency
GRID-MAPFILE-CHECK(8) Globus Commands GRID-MAPFILE-CHECK(8)NAME
grid-mapfile-check-consistency - Add an entry to a grid map file
SYNOPSIS
grid-mapfile-check-consistency [-h] [-help] [-usage] [-version]
grid-mapfile-check-consistency [-mapfile MAPFILE] | [-f MAPFILE]
DESCRIPTION
The grid-mapfile-check-consistency program performs basic checks for validity of a gridmap file. These checks include checks for existence,
duplication of entries, and valid local user names. If the gridmap file is valid, grid-mapfile-check-consistency exits with a zero exit
code, otherwise it exits with a non-zero exit code. In either case, it displays information about its progress as it parses and validates
the gridmap file.
By default, grid-mapfile-check-consistency will check the gridmap file named by the GRIDMAP environment variable if present. If that
variable is not set, it will check the file $HOME/.gridmap for non-root users if present. If that doesn't exist or
grid-mapfile-check-consistency is run as root, it will then check /etc/grid-security/grid-mapfile. This can be changed by the use of the
-mapfile or -f command-line options.
The full set of command-line options to grid-mapfile-check-consistency are:
-help, -h, -usage
Display the command-line options to grid-mapfile-check-consistency.
-version
Display the version number of the grid-mapfile-check-consistency command.
-mapfile MAPFILE, -f MAPFILE
Check the gridmap file named by MAPFILE instead of the default.
EXAMPLES
Check that the gridmap file in /etc/grid-security is valid:
% grid-mapfile-check-consistency -f /etc/grid-security/grid-mapfile
Checking /etc/grid-security/grid-mapfile
Verifying grid mapfile existence...OK
Checking for duplicate entries...OK
Checking for valid user names...OK
Check a gridmap file that has an invalid local user name:
% grid-mapfile-check-consistency -f /etc/grid-security/grid-mapfile
Checking /etc/grid-security/grid-mapfile
Verifying grid mapfile existence...OK
Checking for duplicate entries...OK
ERROR: baduser is not a valid local username
ERROR: Found 1 invalid username(s)
ENVIRONMENT VARIABLES
The following environment variables affect the execution of grid-mapfile-check-consistency:
GRIDMAP
Path to the default gridmap to check.
FILES
The following files affect the execution of grid-mapfile-check-consistency:
$HOME/.gridmap
Path to the default gridmap to check if the GRIDMAP environment variable is not set for non-root users.
/etc/grid-security/grid-mapfile
Path to the default gridmap to check if GRIDMAP environment variable is not set and the above file does not exist.
SEE ALSO grid-mapfile-add-entry(8), grid-mapfile-delete-entry(8)AUTHOR
University of Chicago
Globus Toolkit 5.0.1 03/19/2010 GRID-MAPFILE-CHECK(8)