04-23-2006
${i} is the value of the variable i
${i#01} is the value of the variable i with any leading "01" removed
That leading 73 is just like the trailing .Z which you didn't ask about. We are just tacking some constant text on to both ends of the value of the variable.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I want to rename multiple files at a time and I don't know how to do it.
I have various ".mp3" files, like "band name - music name.mp3" and I want to remove the "band name" from all files.
Anybody knows how to do it using shell script or sed or even perl?
Thanks (7 Replies)
Discussion started by: luiz_fer10
7 Replies
2. Shell Programming and Scripting
Well the title is not too good, so I will explain.
I need to move (rename) files using a simple AIX script.
???file1.txt
???file2.txt
???file1a.txt
???file2a.txt
to be:
???renamedfile1'date'.txt
???renamedfile2'date'.txt
???renamedfile1a'date'.txt
???renamedfile2a'date'.txt
... (4 Replies)
Discussion started by: grimace15
4 Replies
3. Shell Programming and Scripting
Dear All,
Please help !
i ham having 300 file with E.G. PMC1_4567.arc in seq. like PMC1_4568.arc,PMC1_4569.arc ...n and so on.. i want all those file to be rename like PMC_4567.arc ,PMC_4568.arc .. mean i want to remove 1 from first file name ..
pls help.. (6 Replies)
Discussion started by: moon_22
6 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I will use below command for grep single string ("osuser" is search string)
ex: find . -type f | xarg grep -il osuser
but i have one more string "v$session"
here i want to grep in which file these two strings are present.
any help is appreciated,
Thanks in advance.
Gagan (2 Replies)
Discussion started by: gagan4599
2 Replies
5. Shell Programming and Scripting
I have a log directory:
/logs/foo.log
/logs/bar.log
/logs/err.out
I'm trying to find a way to
> /logs/*.log
> /logs/*.out
to blank them out, but of course, that doesn't work.
Any suggestions? (4 Replies)
Discussion started by: Validatorian
4 Replies
6. Shell Programming and Scripting
Hi,
In my directory I have many files, for e.g.
file_123
file_124
file_125
file_126
file_127
Instead of renaming these files one by one, I would like to rename them at a same time using same command... they should appear like
123
124
125
126
127
What command(awk or ls or... (3 Replies)
Discussion started by: juzz4fun
3 Replies
7. Shell Programming and Scripting
Hi,
i need a single command to create multiple empty files(no trailing lines as well) and empty the files if already existing.
please let me know or if this has been ansered, if some ocan share the link please, thanks
> newfile.txt
or
:> newfile.txt
do not work (4 Replies)
Discussion started by: Onkar Banerjee
4 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I would like to sftp 2 files with a single command. I tried the below options,
sftp suer@test13:"/u01/home/oracle/SetDb.sh /u01/home/oracle/.profile" ./
But what actually happens is
Fetching /u01/home/oracle/SetDb.sh to /u01/home/oracle/.profile
/u01/home/oracle/SetDb.sh ... (3 Replies)
Discussion started by: sid2013
3 Replies
9. Shell Programming and Scripting
Hey guys,
I have wrote the following script to apply a module named "trinity" on my files. (it takes two input files and spit a trinity.fasta as output)
#!/bin/bash -l
#SBATCH -p node
#SBATCH -A <projectID>
#SBATCH -n 16
#SBATCH -t 7-00:00:00
#SBATCH --mem=128GB
#SBATCH --mail-type=ALL... (1 Reply)
Discussion started by: @man
1 Replies
10. Shell Programming and Scripting
I have multiple files test1, test2, test3 etc. I want to move to a different directory with ABC_ prefixed to every file and and current dat time as postfix using a single command. (I will be using this is sftp with ! (command for local server).
I have tried the following but it gives error
... (5 Replies)
Discussion started by: Soham
5 Replies
LEARN ABOUT DEBIAN
ledgersmb::dbobject::asset
LedgerSMB::DBObject::Asset(3pm) User Contributed Perl Documentation LedgerSMB::DBObject::Asset(3pm)
NAME
LedgerSMB::DBObject::Asset - LedgerSMB Base Class for Fixed Assets
SYNOPSIS
This library contains the base utility functions for creating, saving, and retrieving fixed assets for depreciation
STANDARD PROPERTIES
id (integer)
Unique id number of asset.
description (text)
Text description of asset.
tag (text)
Arbitrary tag identifier, unique for current, non-disposed assets.
purchase_value (numeric)
Numeric representation of purchase value.
salvage_value (numeric)
Numeric representation of estimated salvage value.
usable_life (numeric)
Numeric representation of estimated usable life.
purchase_date (date)
Date item was purchase
start_depreciation (date)
Date item is put into service, when depreciation should start. If unknown we use the purchase_date instead.
location_id (int)
ID of business location where asset is stored.
department_id (int)
ID of department where asset is stored
invoice_id (int)
ID of purchasing invoice
asset_account_id (int)
ID of account to store asset value
dep_account_id (int)
ID of account to store cumulative depreciation
exp_account_id (int)
ID of account to store expense when disposed of.
obsolete_by (int)
Obsolete by other asset id. Undef if active, otherwise the id of the active asset that replaces this. Used for partial depreciation.
asset_class_id (int)
ID of asset class.
METHODS
save
Uses standard properties
Saves the asset item to the database
Sets any properties set by the database that were not in the original object, usually ID (if no match to current ID or if ID was
undef).
import_file
Parses a csv file. Sets $self->{import_entries} to an arrayref where each member is an arrayref of fields. It is up to the workflow
script to handle these entries.
Header information is set to $self->{import_header}.
get Gets a fixed asset, sets all standard properties. The id property must be set.
search
Searches for asset_items matching criteria. Sets $self->{search_results} to the result.
Search criteria set by the following properties: * id * asset_class * description * tag * purchase_date * purchase_value * usable_life
* salvage_value * start_depreciation * warehouse_id * department_id * invoice_id * asset_account_id * dep_account_id
Tag and description are partial matches. All other matches are exact. Undef matches all values.
save_note
Saves a note. Uses the following properties:
* id * subject * note
get_metadata
Sets the following:
* asset_classes: List of all asset classes * locations: List of all warehouses/locations * deprtments: List of all departments *
asset_accounts: List of all asset accounts * dep_accounts: List of all depreciation accounts * exp_accounts: List of all expense
accounts
get_next_tag
Returns next tag number
Sets $self->{tag} to that value.
import_asset
Uses standard properties. Saves record in import report for batch review and creation.
Copyright (C) 2010, The LedgerSMB core team.
This file is licensed under the Gnu General Public License version 2, or at your option any later version. A copy of the license should
have been included with your software.
perl v5.14.2 2012-03-25 LedgerSMB::DBObject::Asset(3pm)