Shell script if [[ -L <filename> ]]


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell script if [[ -L <filename> ]]
# 1  
Old 05-29-2013
Shell script if [[ -L <filename> ]]

Hi

Please describe about following condition
if [[ -L <filename> ]]
in shell script.

Also please provide the link related all the flags which are applicable for if condition in Shell
# 2  
Old 05-29-2013
Refer Expressions used with if

Or check man pages:
Code:
man test

# 3  
Old 05-29-2013
UNIX/Linux has manual (man) pages. These tell you everything you need to know

[[ and [ functionality is documented under the test command.

On the very page you are reading now - look up and find the blue bar with with characters.

You will see Man Pages. CLick the link, enter test as the command to search for.

On the command line:
Code:
man test

# 4  
Old 05-29-2013
Hi
Thanks for the reply.

I have one more doubt, please dont hesitate to answer if it is simple question.

please let me know the below terminology

1. local _var=$PATH/${1#$PATH}
what is # here, ${1#$PATH}.

2. local _target="${2:-$_var}"
what is :- here, "${2:-$_var}"
# 5  
Old 05-29-2013
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issues while trying to run a shell script using the command sh <filename.prog>

Hi, I'm facing issues while trying to run a sample program on Linux. If I try to run the script using the command "sh <filename.prog>", it doesn't work. But, if I try to execute it using the command "ksh <filename.prog>", it works fine. Even ". ./filename.prog" works fine. Can you... (6 Replies)
Discussion started by: venkatesh17
6 Replies

2. Shell Programming and Scripting

Fetch the latest filename shell script

Hi I want to fetch the latest file form the list example example= filename RATE_STATE_SETUPS.20151222.ccyymmdd.hhmmss.txt File pick which have latest ccyymmdd.hhmmss list of file in directory are RATE_STATE_SETUPS.20151222.20151222.170101.txt... (5 Replies)
Discussion started by: MOHANP12
5 Replies

3. Shell Programming and Scripting

How to sort the timestamp in the filename in shell script?

originally the shellscript #ln_file_name=`echo $ld_interface_date"_"${8}".csv"` #ln_file_name=`echo 201202011527_HL_HLTM1_B04A.csv` ln_file_name="*"`echo ${7}".csv"` get_file_list_1=$log_path"tm1_file_list.gfl1" cd ${source_path} echo "Try to find any file exist in the... (10 Replies)
Discussion started by: feilhk
10 Replies

4. Shell Programming and Scripting

Help shell script to list filename file_path

HI owner date and time and size of file in a row shell script to list filename file_path i have tried the below code present_dir=`pwd` dir=`dirname $0` list=`ls -lrt | awk {'print $9,$3,$6,$7,$8'}` size=`du -h` path=`cd $dir;pwd;` printf "$list" printf "$path" printf " $size" ... (4 Replies)
Discussion started by: abiram
4 Replies

5. Shell Programming and Scripting

Shell script to get one to one map and rename the filename

I have 2 files sorted by numerically. I need help with shell script to read these 2 files and do a 1:1 mapping and rename the filenames with the mapped case#; For example: cat case.txt 10_80 10_90 cat files.txt A BCD_x 1.pdf A BCD_x 2.pdf ls pdf_dir A BCD_x 1.pdf A BCD_x 2.pdf ... (2 Replies)
Discussion started by: iaav
2 Replies

6. Shell Programming and Scripting

Which shell script will call if i execute sh (without filename)?

Hi Friends, The below shell script is written by third party to create B2k_session_id.iam trying to execute this script.When i execute below script it is calling some other scripts.How to find which scripts is calling? . `execom commfunc.com` echo " $PRESENTATION_MODE " if then echo... (1 Reply)
Discussion started by: vadlamudy
1 Replies

7. Shell Programming and Scripting

Passing filename dynamically in SPOOL of SQL*PLUS in shell script

Hi all, I am executing shell script in which I am using SQLLDR In this SQLLDR I am passing text file having PL/SQL script. This script will produce some formated output, this output I have to spool in another text file. Currently I have given this in script file as following Spool... (2 Replies)
Discussion started by: shekharjchandra
2 Replies

8. Shell Programming and Scripting

Send filename as variable in a shell script

I am having some trouble with a shell script I am writing. In the program I pass the path of where certain file names exist. I then want to loop through each file name and pass it as a DATA variable when calling sqlldr for a control file. This is what I have: ls $FILEPATH/${FILENAME}*.csv ... (4 Replies)
Discussion started by: neva
4 Replies

9. Shell Programming and Scripting

Shell script to use the last modified filename in a variable

Forgive me if this is a trivial question, but I haven't been able to find the answer to this. Basically I've got a list of files in a particular directory that have the general form t_*.dat. (I have other files in the same directory as well). Essentially what I want to do is obtain the name... (1 Reply)
Discussion started by: lost.identity
1 Replies

10. Shell Programming and Scripting

How to send filename as variable in a shell script

Can we can pass the filename as variable in the shell script. Sending the filename as a parameter file, the shell script takes the filename, needs to replace the string containing the filename with the variable in the shell script. EX: test1.sh is the shell script and takes file1.csv as... (6 Replies)
Discussion started by: gthokala9
6 Replies
Login or Register to Ask a Question