How To write a simple bash script for Linux

Posted on 2008-11-11
Last Modified: 2013-12-26
Please help...

Trying to make short cuts commands to string commnad in Linux.
This is what I did:

nano t1

and saved to it
cp call.bak call.txt
mv call.txt /var/spool/asterisk/outgoing/call.txt

but get error why type t1 and enter
-bash: /etc/asterisk/t1: Permission denied

Please help..
Question by:shaunwingin
    LVL 29

    Expert Comment

    you need to give access to it

    chmod 755 t1

    then run like this from command prompt

    LVL 29

    Accepted Solution

    sorry its ./t1

    Author Comment

    what does
    chmod 755 t1
    translate to please
    LVL 29

    Expert Comment

    by chmod 755 t1
    you are giving the script execute permission
    LVL 48

    Expert Comment

    755 translates to

    7 read/write/execute permissions for the owner
    5 read/execute permissions for the group
    5 read/execute permissions for others

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
    Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now