General :: Make Simple Website In System Using Bash Scripting?

Apr 3, 2011

How to made a simple website in linux using bash scripting.

View 3 Replies


ADVERTISEMENT

General :: System Administration Scripting - Write Very Basic BASH Shell Scripts

Jan 10, 2011

I'd like to know some good resources, links, e-books to learn basic Linux system administration scripting. I know how to write very basic BASH shell scripts so I'm still at beginner level. There are so many docs out there that I'd like to narrow down people's opinion's on the best easy to understand resources that are available. Eventually I'd like to learn basic PERL as well.

View 3 Replies View Related

General :: Shell Scripting - Compare Strings From Two Different Simple .txt Files?

Jul 29, 2010

what command is to be used to call strings from other files to the script and then comparing strings from two different files in the script to check if strings are matched then return the result to another script.

View 1 Replies View Related

General :: Create A Simple Website Which Can Communicate With Unix Server?

Mar 8, 2010

I want to create a simple website which can communicate with unix server.For example i want to run some command on a unix server through a website.

View 10 Replies View Related

General :: What Is Purpose Of Bash Scripting?

May 15, 2010

What is the purpose of bash scripting? Is it just for file manipulation?

View 4 Replies View Related

General :: How To Set Incrontab In Bash Scripting

Mar 7, 2011

I have a question;

Is it possible to set incrontab in bash script? I tried to set normal crontab and it works like a charm but unfortunately not "incrontab"

I have two bash files; test-incrontab.sh and addlinetocrontab.sh and here are the contents of these files respectively;

Code:

Code:

As you can see there are two enteries in each file. One for normal crontab and other one for incrontab. When i run "test-incrontab.sh" like following;

Code:

crontab works perfectly and i can see cron job set but for incrontab it just does not work. No error either!

I am only getting this back "table unchanged"

View 2 Replies View Related

General :: Bash Scripting - Grab First And Last Number?

Jan 13, 2011

I'm trying to get an output of a file in numeric order. Basically I need the starting number and the ending number in sed this into anther file. The test2.lis file I'm just awk'ing for the first row and if its out of order put it in order so I can grab the first and last numbers. I'm sure I can do this all in an array. The first sed command gets rid of blank lines and outputs it to a file. Then I head and tail for the first and last number then I want to sed those numbers into a file that exsist.

[code]...

The error I get is:

sed: -e expression #1, char 24: unterminated `s' command.

View 13 Replies View Related

General :: Bash Scripting / A Command That Can Stop Others?

Mar 31, 2010

i would like to ask something very simple i hope for most off you but i couldn't find anything in other questions so specific...

So...i need a command to stop another command.

more specific i have to run airodump-ng and i want this command to stop after some seconds (or minutes) automatically....

View 6 Replies View Related

General :: Combine Bash Scripting With Apache?

Apr 3, 2011

how to combine bash scripting with apache.

View 5 Replies View Related

General :: Bash Shell Scripting Request?

Feb 27, 2011

I am working on a simple script that should take two command line arguments, a [number] and a [name]. The first thing the script should do is check to make sure that no more and no less than two command line arguments have been entered when calling the script - an error message should be delivered if the condition is not true.

If two args have been entered, then the message 'processing "scriptname"' should appear, where scriptname is the name of the script being called. The script should then write to the screen "Hi [name]!", and should write this phrase [number] of times. For example, the command $ myscript 2 joe would produce the output: I have read the manual many times looking for examples, and I am very close by virtue of my own efforts. Further, I have searched these forums and others for good examples, which have also gotten me very close. Still my script is not completing the objective, and I am wondering if someone could point me in the right direction. Script:

[Code]...

View 13 Replies View Related

General :: Bash Scripting Auth Check For Pop3?

Mar 30, 2010

I need to make a bash scripting, based on a password and a user,that connect to pop3 server and see if it login,if you can,return ok, otherwise return ERR .

View 10 Replies View Related

General :: Bash Scripting - Removing Strings From MP3 Filenames

Oct 5, 2010

I've been surfing and searching the net quit a while now to make my own script, but I haven't been really successful ever since I want to make a script which can remove strings from my mp3 collection (file names).

For example:
Code:
101-bob_sinclar_feat_sean_paul-tik_tok_(radio_edit).mp3 --> bob_sinclar_feat_sean_paul-tik_tok_(radio_edit).mp3
10-Young Jeezy-Lose My Mind (78 Bpm) (Repack).mp3 --> young_jeezy-lose_my_mind.mp3

Now the problem is how can I remove the strings like:
101 & 10 (dynamic)
(%%% Bpm) (dynamic)
(Repack) (static)

View 11 Replies View Related

General :: Change Case Of A String (BASH Scripting)?

Jul 9, 2010

Is there any inbuilt functionality in Unix shell script so that i can able to convert lower case string input to an upper case? I dont want to use high level languages like java,python or perl for doing the job.

View 4 Replies View Related

General :: Write Either PYTHON Or Bash Shell Scripting?

Jun 4, 2010

I do not know how to write either PYTHON or Bash Shell Scripting. I am to learn one for Linux Administration purpose. Which one will you recommend for a Linux Admin/Eng environment?

View 4 Replies View Related

General :: What Is Great Book To Start Learning Scripting In Bash?

Apr 23, 2010

I've been switched to a new department at work and am totally clueless when it comes to scripting in bash. When I told them I was a fast learner, I didn't think they'd throw me into the deep end of the pool so fast. So to make a long story short. What is a great book to start learning scripting in bash? My supervisor already gave me a simple task to do. Conceptually it sounds quite easy in my head, but actually writing out a script is a bit more daunting and complexed than I first thought.

View 3 Replies View Related

Programming :: Reading A Bash Variable In Bash Scripting ?

Nov 26, 2008

I have a config file that contains:

my.config:

Code:

Now in my bash script, I want to get the output /home/user instead of $HOME once read. So far, I have managed to get the $HOME variable but I can't get it to echo the variable. All I get is the output $HOME.

Here is my parse_cmd script:

Code:

View 3 Replies View Related

General :: Bash Scripting - Executes A Few Perl Scripts - Create A New Array And Take The Hostname

Apr 4, 2011

I'm writing a bash script that executes a few perl scripts. One of the perl scripts that I need to execute requires two arguments with it. The arguments are stored in a txt file, each line contains a hostname and its corresponding IP address separated by a ":" (colon), the txt file looks like this below:

[Code]...

I'm not sure if it's the best way to accomplish this but here it goes. In the bash file, let's call it getHosts.sh, I create an array and assign each line of the file to an element in that array. I then think I need to create a new array where I take the hostname (which is before the ":") separate it from its IP address and place the IP address on a new line just below the hostname (this way I can reference to it like $hostNames[$x] would be the hostname, and $hostNames[$x+1] would be its IP address). So the new array would now look like this below:

[Code]...

View 4 Replies View Related

General :: Simple Bash Command Causing Bad Variable Name

Feb 18, 2010

When I run this command from shell, it runs ok
export REVS=`svn info svn+ssh://svn.myone.ca/var/svn/story/trunk/lib |grep 'Last Changed Rev:'| awk -F: '{print $2}'`
However when I save it into a file called test.sh (of course, I chmod it with +x), I got error "export: 2: bad variable name"

Here is the file:
#!/bin/bash
export REVS=`svn info svn+ssh://svn.myone.ca/var/svn/story/trunk/lib |grep 'Last Changed Rev:'| awk -F: '{print $2}'`
I am using ubuntu.

View 7 Replies View Related

General :: Create A Simple GUI For The Bash Script Files?

Feb 20, 2010

Are there any tools that can be used to create a simple GUI for the bash script files i have created, and the GUI should be able to run on both Solaris and Red Hat systems.

View 4 Replies View Related

General :: SSD Trim Simple Bash Script Program?

Jul 9, 2011

I wrote this script which works but it should run automatically about once per week. I hunted and experimented with KDE Task Scheduler (no dice and no help anywhere) and cron (confusing instructions and cannot edit crontab -e with vim, and cannot enter cron folders/files). I would settle for a desktop shortcut to run the script but found no for that.

Script:

Code:

#!/bin/bash
xterm -hold -e fstrim -v /
Machine:
OS: openSUSE 11.4 x86_64

[code].....

View 13 Replies View Related

General :: Unable To Execute Simple Bash Scripts ?

Dec 24, 2010

All of a sudden,i can't execute a simple script as follows:

exit 0

and:

exit

View 18 Replies View Related

General :: Writing A Bash Shell Script For Website Backup

Aug 10, 2010

I am about to write my first shell script for backing up my server.

These are the steps I have identified so far.

Copy files to be backed up to /srv/backup/ run mysqldump and copy the file to srv/backup/databases run duplicity to backup /srv/backup/* to another folder on my machine

I am writing a bash shell scrip that will be run everyday, and will carry out the three tasks mentioned above.

Note: point 3 (backing up to a local folder) is only a temporary measure - to allow me to understand what I'm doing, since all the tools I am using, are new to me. Once I can backup and restore correctly, I will use duplicity to compress and encrypt the files and upload them offsite.

If my understanding of duplicity is correct (according to the documentation here), the first time I run the script, a FULL backup will be done. Every subsequent backup will then be incremental. I will then force a FULL back on say a weekend.

First things first though - I have a few questions:

I would like to use backup rotation for the 'scheme' described above - I would like some recommendations on what kind/type of rotation to use. Once I have implemented the backup rotation, how can I restore from a particular day back in time (assuming the backup exists of course). ?

I am running Ubuntu 10.0.4

View 1 Replies View Related

Ubuntu :: Building Simple Locally Hosted Website?

May 9, 2011

My daughter wants to build a little website that looks a bit like a magazine for her family and select friends. Front page has links to stories or articles she'll write. She would also like to post some pictures for people to see and maybe have people add comments if they like. I'd like to host it locally on our home server and limit access with an id and password. I would use something like DYNDNS.com to point family and friends to our server where they could login. I have an Ubuntu Lamp server setup to install what we need.

View 4 Replies View Related

General :: Bash Variable - Simple Script For Finding And Copying Files Powered By The Command?

Aug 2, 2009

Ive been using linux for a while but I am just getting into shell scripting, im currently trying to get a simple script for finding and copying files powered by the command:

Code:

This works fine from the command line but when put in a script such as:

Code:

Code:

with the keyboard inputs for $fc1 and $fc2 being *.doc and ~/test respectivly. The only problem i can see is the xargs -ivar "var" part possibly needing $var to be defined?

View 2 Replies View Related

OpenSUSE :: Create And Host A Simple Website Using LAMP And Drupal?

Feb 14, 2010

I wanted to create and host a simple website using LAMP and Drupal. I read an article in a Linux magazine a while back on how to do this, but can't seem to find any instructions. Can someone direct me to a site or link that has step by step instructions on setting up lamp and drupal?

View 9 Replies View Related

General :: Bash Scripting - Sed - Lame - Character To Lame To Escape Spaces

Mar 20, 2010

Ok, so I find myself ripping audio CDs frequently, which I then lame to mp3's to put on my media player. I usually define the --ta and --tl (artist and album) ID3 tags and batch encode each album, but don't bother with the track tags as I'd have to do each one seperately.

So, I'm working on a script to do all this for me, extracting info from 'pwd' etc. to fill in the blanks for --ta, --tl and --tt (track name). All is working well, except that I can't get sed to pass on the "" character to lame to escape spaces.

Here's what I've got so far: (trouble spot is bolded - no need to pay attention to the rest of it)

Code:

All this does is pass a 'space' on to lame, which it takes as an invalid argument.

View 10 Replies View Related

Ubuntu :: Absolute Easiest Way For Noob To Host Simple Website From Non Server Desktop?

Jul 31, 2010

Are there programs for this? Really really simple page layouts that you can edit and host from a graphical desktop that has your web browsers and Pidgen and VLC media player and everything running on it at the same time?

View 9 Replies View Related

CentOS 5 Server :: Get A Simple FTP Setup To Var/www/html Folder For Canned Joomla Website?

Jun 28, 2009

I am having a time at trying to get a simple FTP setup to my Var/www/html folder for my canned Joomla website. I can log in anon with no write permissions, but it will not log in using any users I have setup on the server. I've googled a bunch, but nothing to correct my 530 authentication failure when I try to log in as one of my user accounts for the server.

View 2 Replies View Related

Programming :: Make A Bash Script Start Automaticly When System Restart?

Apr 4, 2009

ia have this script
#!/bin/bash
if [ -e /tmp/mysql.pipe ]; then

[code]...

View 3 Replies View Related

Ubuntu :: Bash Scripting Gives Bad Substitution

Feb 18, 2011

I'm trying to get the substring of a string in bash. Here is the code:
Code:
#! /bin/bash
LOCAL_HOSTNAME=$(hostname)
echo $LOCAL_HOSTNAME
INDEX_OF=`expr index "$LOCAL_HOSTNAME" 1`
echo $INDEX_OF
SERVER_HOSTNAME=${LOCAL_HOSTNAME:0:INDEX_OF}
echo $SERVER_HOSTNAME

It's supposed to get the current hostname, assign it to variable LOCAL_HOSTNAME, get the first occurrence of "1" from hostname and assign value to INDEX_OF, the get the substring from variable LOCAL_HOSTNAME (starting at index 0 through INDEX_OF) and asign it to SERVER_HOSTNAME. No matter how much I've tried it keeps throwing Bad substitution error at the substring. I've searched and it says it has to be bash... but it is bash, both the sh script and the running shell. The LOCAL_HOSTNAME and INDEX_OF variables are ok.

Here is the output:
I've also tried to get the substring without the INDEX_OF but it gives the same error: SERVER_HOSTNAME=${LOCAL_HOSTNAME:0}
Code:
host1
5
test.sh: 7: Bad substitution

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved