9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi.
I've created scripts for a recycle bin that can list, restore and empty it. I only have the problem of deleting two files with the same name. When I do it one file overwrite the other. What could I do to resolve it? The only thing I can think is asking the user to rename file before moving to... (2 Replies)
Discussion started by: ReonarudoB
2 Replies
2. UNIX for Dummies Questions & Answers
Hi.
I'm started to use minix 3.2.1 recently and I'm trying to create a recycle bin for it. I'm kinda struggling on how to do it. I searched internet and I found scripts created for it but I actually didn't learn how to create scripts in college and I'm not sure if I understand them. I just wanted... (1 Reply)
Discussion started by: ReonarudoB
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
Now I have: /Users/okn/bin for my private shell scripts.
How do I add /Users/okn/bin to my PATH?
The PATH is right now:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
The .bash_profile doesn't state anything about a PATH (yet).
I read about this:
PATH=/bin:$PATH
export PATH
or... (1 Reply)
Discussion started by: OmarKN
1 Replies
4. Shell Programming and Scripting
what is recycle bin mode in unix??? (4 Replies)
Discussion started by: arun508.gatike
4 Replies
5. UNIX for Dummies Questions & Answers
Hi~ I have a problem with my recycle bin code.
#!/bin/bash
if test !-d ~/.recyclebin #if recycle bin does not exists
then
mkdir ~/.recyclebin # then create recycle bin
else
mv $1 ~/.recyclebin #else move the deleted file in the recycle bin
fi
so when I... (10 Replies)
Discussion started by: zel2zel
10 Replies
6. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
A set of Linux shell scripts is required to allow users to ‘remove' files without them really disappearing until... (8 Replies)
Discussion started by: burn88
8 Replies
7. Shell Programming and Scripting
Hello,
I have having problems with an assignment and am pretty desperate. My assignment is to create a shell script that does a Recycle_Bin tasks. You can only open this with PuTTY software or Knoppix. Perhaps on other software that are able to read linux language.
My part is stuck... (2 Replies)
Discussion started by: chueu
2 Replies
8. Shell Programming and Scripting
Hello, I'm only taking Intro to UNIX in school right now, so please bear with me. My problem is with a sort-of recycle-bin rig I've created for fun. I'm using Ubuntu 9.04, I am the admin. (only user, actually) of this computer. I'm using this script in ~/.bashrc
# if files exist, remove contents... (6 Replies)
Discussion started by: jzacsh
6 Replies
9. Shell Programming and Scripting
i wrote a script and is running. I add the path bin to variable PATH, i.e.
PATH=$PATH/bin. i add this to PATH in order to run the script in any path working directory. Thats ok. The problem is as son as i close the session and start a new session, changes are lost. How can i tell the shell or... (1 Reply)
Discussion started by: alexcol
1 Replies
LEARN ABOUT LINUX
megaco_encoder
megaco_encoder(3erl) Erlang Module Definition megaco_encoder(3erl)
NAME
megaco_encoder - Megaco encoder behaviour.
DESCRIPTION
The following functions should be exported from a megaco_encoder callback module:
DATA TYPES
megaco_message() = #'MegacoMessage{}'
transaction() = {transactionRequest, transaction_request()} |
{transactionPending, transaction_reply()} |
{transactionReply, transaction_pending()} |
{transactionResponseAck, transaction_response_ack()} |
{segmentReply, segment_reply()}
transaction_request() = #'TransactionRequest'{}
transaction_pending() = #'TransactionPending'{}
transaction_reply() = #'TransactionReply'{}
transaction_response_ack() = [transaction_ack()]
transaction_ack() = #'TransactionAck'{}
segment_reply() = #'SegmentReply'{}
action_request() = #'ActionRequest'{}
action_reply() = #'ActionReply'{}
EXPORTS
Module:encode_message(EncodingConfig, Version, Message) -> {ok, Bin} | Error
Types EncodingConfig = list()
Version = integer()
Message = megaco_message()
Bin = binary()
Error = term()
Encode a megaco message.
Module:decode_message(EncodingConfig, Version, Bin) -> {ok, Message} | Error
Types EncodingConfig = list()
Version = integer() | dynamic
Message = megaco_message()
Bin = binary()
Error = term()
Decode a megaco message.
Note that if the Version argument is dynamic , the decoder should try to figure out the actual version from the message itself and
then use the proper decoder, e.g. version 1.
If on the other hand the Version argument is an integer, it means that this is the expected version of the message and the decoder
for that version should be used.
Module:decode_mini_message(EncodingConfig, Version, Bin) -> {ok, Message} | Error
Types EncodingConfig = list()
Version = integer() | dynamic
Message = megaco_message()
Bin = binary()
Error = term()
Perform a minimal decode of a megaco message.
The purpose of this function is to do a minimal decode of Megaco message. A successfull result is a 'MegacoMessage' in which only
version and mid has been initiated. This function is used by the megaco_messenger module when the decode_message/3 function fails to
figure out the mid (the actual sender) of the message.
Note again that a successfull decode only returns a partially initiated message.
Module:encode_transaction(EncodingConfig, Version, Transaction) -> OK | Error
Types EncodingConfig = list()
Version = integer()
Transaction = transaction()
OK = {ok, Bin}
Bin = binary()
Error = {error, Reason}
Reason = not_implemented | OtherReason
OtherReason = term()
Encode a megaco transaction. If this, for whatever reason, is not supported, the function should return the error reason not_imple-
mented .
This functionality is used both when the transaction sender is used and for segmentation. So, for either of those to work, this
function must be fully supported!
Module:encode_action_requests(EncodingConfig, Version, ARs) -> OK | Error
Types EncodingConfig = list()
Version = integer()
ARs = action_requests()
action_requests() = [action_request()]
OK = {ok, Bin}
Bin = binary()
Error = {error, Reason}
Reason = not_implemented | OtherReason
OtherReason = term()
Encode megaco action requests. This function is called when the user calls the function encode_actions/3 . If that function is never
used or if the codec cannot support this (the encoding of individual actions), then return with error reason not_implemented .
Module:encode_action_reply(EncodingConfig, Version, AR) -> OK | Error
Types EncodingConfig = list()
Version = integer()
AR = action_reply()
OK = {ok, Bin}
Bin = binary()
Error = {error, Reason}
Reason = not_implemented | OtherReason
OtherReason = term()
Encode a megaco action reply. If this, for whatever reason, is not supported, the function should return the error reason not_imple-
mented .
This function is used when segmentation has been configured. So, for this to work, this function must be fully supported!
Ericsson AB megaco 3.15.1 megaco_encoder(3erl)