08-19-2009
Thanks but the outcome is
,5678,8912,3456,7890
It missed the first line
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
There is an error when i am trying to use the shift command in this way:
($1 = -d, $2 = 123, $3 = -c etc etc)
for $arg in $@
do
case $arg in
"-d") shift; (so that the $2 will become the $arg now)
(and while it loop the 2nd time,)
... (1 Reply)
Discussion started by: AkumaTay
1 Replies
2. Shell Programming and Scripting
Hi Folks,
In shell scripting the maximum no. of command line parameters becomes 9(Am i right). If we want to get more than 9 parameters we use the shift command.
Even here there are two possibilities.
1. Without the use of variables - The arguments are lost and the lost no. is equal to the... (6 Replies)
Discussion started by: Nisha
6 Replies
3. Shell Programming and Scripting
I am running a program where in I have this command
which is giving error the shift: number is not correct.
can you please tell me how shift actually works?
the line which is giving error is-
set $PARAM; shift; shift; shift; shift; shift; shift; shift; shift
Is it related somewhere to... (2 Replies)
Discussion started by: shrao
2 Replies
4. AIX
AIX:Command to get netaddress/subnet address command in IPv4/IP6
Can anybody help us with a command to retrieve netaddress/subnet address command in IPv4/IP6 on aix machine.
net/subnet address is in the format 172.16.212.0(signifies all 255 machines in an IPv4 network) (2 Replies)
Discussion started by: rookie8278
2 Replies
5. AIX
When I import VG, it shows:
0516-622 synclvodm: Warning, cannot write lv control block data.
I found AIX V4.3 have updatelv command can recovery LVB from VG, however, updatelv is not existed on AIX 5L, which command to replace it? (2 Replies)
Discussion started by: rainbow_bean
2 Replies
6. Shell Programming and Scripting
Hello Expert
Can any one please explain what is the use of shift command in general terms:
set -- $(ls -t)
shift
rm -Rf $*
what is the use of shift command over here.
Thanks a lot for your help (2 Replies)
Discussion started by: aks_1902
2 Replies
7. UNIX for Dummies Questions & Answers
think using shift would help me finish my script but cant get it work without your help. would appreciate if you give me a example with shift & counter in the same script so I can later work on that to my one.
Thanks and Good Luck! (1 Reply)
Discussion started by: me.
1 Replies
8. Shell Programming and Scripting
Hi All,
I am trying to select 30 days older files under current directory ,but not from subdirectory using below command.
find <Dir> -type f -mtime + 30
This command selecting all the files from current directory and also from sub directory .
I read some documention through internet ,... (1 Reply)
Discussion started by: kommineni
1 Replies
9. Shell Programming and Scripting
Hello,
I am reading one of the AIX manuals about shell scripting and (AIX 5) and I found this example when introducing to functions:
function usage
{
prog="$1"; shift
print -u2 "$prog: usage: $prog $@"
exit 1
}
This example is meant to be easy but I don't understand what it is... (5 Replies)
Discussion started by: Kibou
5 Replies
10. Shell Programming and Scripting
#!/bin/bash
hostname=$1; shift
for hostname in $1
do
ping $hostname
done
I want to run the above script as hostname.sh yahoo.com google.com cnn.com. I want to shift each hostname to $1. How can do that with above code as currently it's not shifting. (5 Replies)
Discussion started by: scj2012
5 Replies
LEARN ABOUT LINUX
costransactions_resource
CosTransactions_Resource(3erl) Erlang Module Definition CosTransactions_Resource(3erl)
NAME
CosTransactions_Resource - This module implements the OMG CosTransactions::Resource interface.
DESCRIPTION
To get access to the record definitions for the structures use:
-include_lib("cosTransactions/include/CosTransactions.hrl").
EXPORTS
commit(Resource) -> Return
Types Resource = #objref
Return = ok | {'EXCEPTION', E}
E = #'CosTransactions_NotPrepared'{} | #'CosTransactions_HeuristicRollback'{} | #'CosTransactions_HeuristicMixed'{} | #'Cos-
Transactions_HeuristicHazard'{}
This operation instructs the Resource to commit all changes made as a part of the transaction.
The Resource can raise:
* Heuristic Exception - if a Heuristic decision is made which differ from the true outcome of the transaction. The Resource must
remember the Heuristic outcome until the forget operation is performed.
commit_one_phase(Resource) -> Return
Types Resource = #objref
Return = ok | {'EXCEPTION', E}
E = #'CosTransactions_HeuristicHazard'{} | #'CosTransactions_TransactionRolledBack'{}
If possible, the Resource should commit all changes made as part of the transaction, else it should raise the TRANSACTION_ROLLEDBACK
exception. This operation can only be used if the Resource is the only child of its parent.
forget(Resource) -> Return
Types Resource = #objref
Return = ok
This operation informs the Resource that it is safe to forget any Heuristic decisions and the knowledge of the transaction.
prepare(Resource) -> Return
Types Resource = #objref
Return = Vote | {'EXCEPTION', E}
Vote = 'VoteReadOnly' | 'VoteCommit' | 'VoteRollback'
E = #'CosTransactions_HeuristicMixed'{} | #'CosTransactions_HeuristicHazard'{}
This operation is invoked on the Resource to begin the two-phase commit protocol.
The Resource can reply:
* 'VoteReadOnly' - if no persistent data has been modified by the transaction. The Resource can forget all knowledge of the trans-
action.
* 'VoteCommit' - if the Resource has been prepared and is able to write all the data needed to commit the transaction to stable
storage.
* 'VoteRollback' - under any circumstances but must do so if none of the alternatives above are applicable.
* Heuristic Exception - if a Heuristic decision is made which differ from the true outcome of the transaction. The Resource must
remember the Heuristic outcome until the forget operation is performed.
rollback(Resource) -> Return
Types Resource = #objref
Return = ok | {'EXCEPTION', E}
E = #'CosTransactions_HeuristicCommit'{} | #'CosTransactions_HeuristicMixed'{} | #'CosTransactions_HeuristicHazard'{}
This operation instructs the Resource to rollback all changes made as a part of the transaction.
The Resource can raise:
* Heuristic Exception - if a Heuristic decision is made which differ from the true outcome of the transaction. The Resource must
remember the Heuristic outcome until the forget operation is performed.
Ericsson AB cosTransactions 1.2.10 CosTransactions_Resource(3erl)