Try echo "$TEMP_FILE" to make sure it's really the value you think it is.
Put $TEMP_FILE in quotes like above, because otherwise the shell will split it apart when it contains spaces.
This won't do what you think it does:
This sets it to the literal string "ls $FILEPATH/${FILENAME}*.csv". I think you meant to use backticks instead.
Which would be a combo useless use of ls and useless use of backticks anyway. You don't need to use ls or backticks here, the shell's flexible enough to use its own globbing directly:
I think that was the root problem here. You were feeding the string "ls $FILEPATH/${FILENAME}*.csv" into the program instead of looping over each file.
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)
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)
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)
HI,
MY question is a very simple one:
if i want to call an awk script with the input file name and also pass a variable value , then how to do it.
#>awk -f my_script.awk -v variable=value my_inputfile.txt
I can't do it like this.
throws error:
awk: my_script.awk:18:... (0 Replies)
Hi
Please describe about following condition
if ]
in shell script.
Also please provide the link related all the flags which are applicable for if condition in Shell (4 Replies)
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)
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)
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)
Hi Guys,
I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
Discussion started by: Sambit Sahu
11 Replies
LEARN ABOUT MOJAVE
uri::url5.18
URI::URL(3) User Contributed Perl Documentation URI::URL(3)NAME
URI::URL - Uniform Resource Locators
SYNOPSIS
$u1 = URI::URL->new($str, $base);
$u2 = $u1->abs;
DESCRIPTION
This module is provided for backwards compatibility with modules that depend on the interface provided by the "URI::URL" class that used to
be distributed with the libwww-perl library.
The following differences exist compared to the "URI" class interface:
o The URI::URL module exports the url() function as an alternate constructor interface.
o The constructor takes an optional $base argument. The "URI::URL" class is a subclass of "URI::WithBase".
o The URI::URL->newlocal class method is the same as URI::file->new_abs.
o URI::URL::strict(1)
o $url->print_on method
o $url->crack method
o $url->full_path: same as ($uri->abs_path || "/")
o $url->netloc: same as $uri->authority
o $url->epath, $url->equery: same as $uri->path, $uri->query
o $url->path and $url->query pass unescaped strings.
o $url->path_components: same as $uri->path_segments (if you don't consider path segment parameters)
o $url->params and $url->eparams methods
o $url->base method. See URI::WithBase.
o $url->abs and $url->rel have an optional $base argument. See URI::WithBase.
o $url->frag: same as $uri->fragment
o $url->keywords: same as $uri->query_keywords
o $url->localpath and friends map to $uri->file.
o $url->address and $url->encoded822addr: same as $uri->to for mailto URI
o $url->groupart method for news URI
o $url->article: same as $uri->message
SEE ALSO
URI, URI::WithBase
COPYRIGHT
Copyright 1998-2000 Gisle Aas.
perl v5.18.2 2012-02-11 URI::URL(3)