Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Using ls in a script for another directory Post 36860 by oombera on Thursday 5th of June 2003 06:52:46 PM
Old 06-05-2003
Not sure why it's set in the script, so you may want to leave it on for the rest of the script; however, for that one part you're going to want to turn noglob off.

When noglob is on, it prevents the wildcard expansion of *, ?, etc.

You'll want to modify your script something like this:
Code:
PWDIR=/app/icop/aircrews/CIP/data/CMSLOG/log/batch/history
set +o noglob           # turn noglob off so asterisk expands
ls -ls ${PWDIR}/*.fixed
set -o noglob           # turn noglob on in case script needs it

 

10 More Discussions You Might Find Interesting

1. Solaris

running script in any directory

hi im a cobol programmer but im new in unix. I just want to know how can i run script even if it is in other directory?? Thanks, (1 Reply)
Discussion started by: shinjeck
1 Replies

2. Shell Programming and Scripting

Executing script's directory

I have a shell script /home/user1/bin/sh1, how can I print out the directory of this file inside the script. Say I am in /home/user1/, then I run /home/user1/bin/sh1 I need it to print out /home/user1/bin. Thanks. (2 Replies)
Discussion started by: jasony001
2 Replies

3. UNIX for Dummies Questions & Answers

Script to find a string in a directory/sub-directory

I'm trying to find this string 'preparing string IBE_Quote_W1_Pvt.SaveWrapper for quote_header_id’ in my Apache log file directory. The log file that contains this string may be in a parent direcotry or a sub-directory. I have tried 'grep' and 'awk' with no success. I would like to get the path... (3 Replies)
Discussion started by: gross
3 Replies

4. Shell Programming and Scripting

Run script from the directory it is in

I have a script at /java/custom/build.sh I want to force the user to execute the script from the /java/custom directory ONLY. In other words if the user is in /java I want to exit if they execute custom/build.sh The directory structure may change from the env to env, so I can't use... (4 Replies)
Discussion started by: t_c_1980
4 Replies

5. Shell Programming and Scripting

script that reads all the scripts in the directory and run them within that script

Hi I am trying to write a shell script that is reading all the scripts in the current directory (currently 5) and is allowing me to run the scripts that is in the directory. I want that this scripts asks te user to execute 1 of the listed scripts. I have 4 sample scripts in the directory:... (8 Replies)
Discussion started by: I-1
8 Replies

6. Shell Programming and Scripting

Script which removes files from the first directory if there is a file in the second directory

Script must removes files from the first directory if there is a file with same name in the second directory Script passed to the two directories, it lies with them in one directory: sh script_name dir1 dir2 This is my version, but it does not work :wall: set - $2/* for i do set -... (6 Replies)
Discussion started by: SLAMUL
6 Replies

7. Shell Programming and Scripting

Shell scripting-I need a script which should watch a directory for a file with specific directory

I need a script which should watch a directory for a file with specific directory. If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column. The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies

8. Shell Programming and Scripting

Moving Files one directory to another directory shell script

Hi, Could you please assist how to move the gz files which are older than the 90 days from one folder to another folder ,before that it need to check the file system named "nfs" if size is less than 90 or not. If size is above 90 then it shouldn't perform file move and exit the script throwing... (4 Replies)
Discussion started by: venkat918
4 Replies

9. Shell Programming and Scripting

What is the function of the following lines at the top of a shell script file: Directory and Script?

The file starts like this: Directory: <path to the script> Script: <script fife name> #!bin/ksh ##Comments <actual script> What is the use of the first two lines in the script? What if I save the file without them? What will be the effect? They are not comments. Im very new to this,... (4 Replies)
Discussion started by: remytom
4 Replies

10. Shell Programming and Scripting

Shell script cannot create directory and move the file to that directory

I have a script, which is checking if file exists and move it to another directory if then mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly ... (9 Replies)
Discussion started by: digioleg54
9 Replies
MSET(1) 						      General Commands Manual							   MSET(1)

NAME
mset - retrieve ASCII to IBM 3270 keyboard map SYNOPSIS
mset DESCRIPTION
Mset retrieves mapping information for the ASCII keyboard to IBM 3270 terminal special functions. Normally, these mappings are found in /usr/share/misc/map3270 (see map3270(5)). This information is used by the tn3270 command (see tn3270(1)). Mset can be used store the mapping information in the process environment in order to avoid scanning /usr/share/misc/map3270 each time tn3270 is invoked. To do this, place the following command in your .login file: set noglob; setenv MAP3270 "`mset`"; unset noglob Mset first determines the user's terminal type from the environment variable TERM. Normally mset then uses the file /usr/share/misc/map3270 to find the keyboard mapping for that terminal. However, if the environment variable MAP3270 exists and contains the entry for the specified terminal, then that definition is used. If the value of MAP3270 begins with a slash (`/') then it is assumed to be the full pathname of an alternate mapping file and that file is searched first. In any case, if the mapping for the terminal is not found in the environment, nor in an alternate map file, nor in the standard map file, then the same search is performed for an entry for a terminal type of unknown. If that search also fails, then a default mapping is used. FILES
/usr/share/misc/map3270 keyboard mapping for known terminals SEE ALSO
tn3270(1), map3270(5) BUGS
If the entry for the specific terminal exceeds 1024 bytes, csh(1) will fail to set the environment variable. Mset should probably detect this case and output the path to the map3270 file instead of the terminal entry. 4.3 Berkeley Distribution November 16, 1996 MSET(1)
All times are GMT -4. The time now is 04:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy