That is difficult to understand or believe, respectively. I touched all those files:
and there will be just two files found for the pattern you gave:
There should NOT be that multitude of files listed that you present as the output of echo $number. What be the output of echo libvclient_release_x64.so.* in that environment?
Sorry, I can't follow you. Where did you run the
command?
In a test directory on my host, where I created all the files you showed with the touch command.
Again: the error you posted is not reproducible without further information. The reason I insist is that the proposal in post#2 is the most cost / resource effective one and should work perfectly.
In a test directory on my host, where I created all the files you showed with the touch command.
Again: the error you posted is not reproducible without further information. The reason I insist is that the proposal in post#2 is the most cost / resource effective one and should work perfectly.
Hello RudiC,
you can download the Valentina Server Linux 64 DEB deb package from here: Download
then unpack it with
Then you get three files:
control.tar.gz
data.tar.xz
debian-binary
Further, you can unpack the data.tar.xz archive and get three directories:
etc/
opt/
usr/
In the opt/VServer/ dir there is among others the
vcomponents/ dir, which contains the files which are in question.
You can see there that in vcomponents/ dir is only one version of libraries, currently it is 740 version. So at a time there is only one number at the end of some filenames.
When my ebuild on Gentoo Linux system unpack the downloaded deb package, it gets the exact dirs and files out there. Naturally, the files and it's versions will change at time.
I hope I explained to you what is the situation. Right?
If it is made very sure that there will be only one numbered file version at a time, then why do you need to find out the sequence number? Create the symlink immediately to the only version that exists.
I presume the dosym command does exactly this: create a symbolic link. If not so, what does it do?
What rdtx1 gave you is a so-called variable expansion in the shell.
This:
Quote:
Originally Posted by rdrtx1
Respectively the last part: ${variable_name##*[.]} means: take from the content of variable_name everything after the last ".". To understand how it works try this:
So, rdtx1 showed you a way of isolating the part you are interested in from the full filename. You will still have to provide the full filename first.
But you tried to use an asterisk "*" as part of the filename. This is expanded by the shell not to a single filename but a list of names. Consider the following:
The reason for this is that in fact the content of the variable is "*" and you can't remove any "part before the dot" because there isn't any dot. But when you try to display this asterisk with the echo-command the shell replaces it with a list of files named along the pattern (i.e. when you specifiy "abc*" the pattern is "all files with names starting with "abc").
Therefor you need to not use the asterisk as part of your variables content but the list it produces - and then trim the resulting filenames one at a time with the expression rdtx1 gave you. Like this:
Hello,
I need to add a part of folder name to the files inside it. For instance the file is
HMCBackup_20150430.155027.tgz
and it is under directory /nim/dr/HMCBackup/cops22
I need to add cops22 to the file name so as it would be cops22_HMCBackup_20150430.155027.tgz
Any help in doing... (10 Replies)
Hi guys!
I have quite a lot of files like
all_10001_ct1212307460308.alf*
and I want to get rid of the first number for all at once like:
all_ct1212307460308.alf*
How can I do this in the shell? (12 Replies)
Hi All,
Thanks in Advance
Shell Script or Perl Script
I am working on a shell script. I need some assistance.
My Requirement:
1) There are some set of files in a directory like given below
OTP_UFSC_20120530000000_acc.csv
OTP_UFSC_20120530000000_faf.csv... (7 Replies)
Hi All,
Thanks in Advance
I am working on a shell script. I need some assistance.
My code:
if
then
set "subscriber" "promplan" "mapping" "dedicatedaccount" "faflistSub" "faflistAcc" "accumulator"\
"pam_account";
for i in 1 2 3 4 5 6 7 8;... (0 Replies)
Hi All,
Thanks in Advance
I am working on a shell script. I need some assistance.
My Requirement:
1) There are some set of files in a directory like given below
OTP_UFSC_20120530000000_acc.csv
OTP_UFSC_20120530000000_faf.csv
OTP_UFSC_20120530000000_prom.csv... (0 Replies)
Hi All,
I have the file & name is "/a/b/c/d/e/xyz.dat"
I need "/a/b/c/d/e/" from the above file name.
I tryning with echo and awk. But it not come. Please help me in this regard.
Thanks & Regards,
Dathu (3 Replies)
Hi All,
I'm trying to get part of a filename and my skill with regular expression are lacking. I know I need to use SED but have no idea how to use it. I'm hoping that someone can help me out. The file names would be:
prefix<partwewant>suffix.extension
the prefix and suffix are always 3... (4 Replies)
I've many file like this
01-file
01_-_file
01_-_file
01_-_file
01_-_file
01-file
I would remove bold part from filename. Suggestions?Thanks (4 Replies)
I like to have the date in the 2008-09-01 format at the beginning of my filenames. I then hyphenate after that and then have my filename.
I have a script that creates this for me. However, I may be working on files that already have the date format already in there and so I don't want to have a... (4 Replies)
Hi,
I need to extract only a part of the filenames of some files. The files are named this way :
.tap_profile_SIT02
I want the "SIT02" part, which is not the same for each file. I was able to get what I want with bash, but not with ksh. Here is the command I used in bash :
find... (8 Replies)