Advertisement

Over 40 Experts attended the first Annual Core Conference! Take a look at what happened throughout the week...

2008 Core Conference

 

Welcome! If you have any general questions about Experts Exchange, feel free to ask me.

 
Time Tested bash Solutions: 51 - 75 of 84
 
hi I would like to create an script that would interactively would ask me for a pattern to search in a given file. Once pattern is found it should delete the line in such a way that if the ori...
How can I construct a  loop in a bash script which loops over the lines in the file. On each iteration of the loop I want to read the line into some variable.
Hi guys hope you can help. Ive got the following code snippet that is not working when using the read function. echo -n "Enter the menu1 parent folder name that this menu2 file will resi...
Hi, I am trying to identify the problem that I am experiencing. I have a bouch of the shell script and perl scripts that work together as a set of process. This script run continuesly, On...
Hello Im trying to develop my first custom event handler on a SMS message that will scan incoming text with different cases of string "KEY", "key" or "Key". This project is running on a linux ...
im trying to write a shell script to automatically download some software and install it. heres what i have: #!/bin/bash clear wget http://www.somesite.com/downloads/software-current.t...
Hello all, I have several joomla web sites on a server that use a component that contains a file that needs to be updated. The updated file is contained in root's home directory and is call...
I am writing a script that is going to calculate the likely results of an attack in the game Risk using bash.  I have successfullly sorted 6 sided dice values from the $RANDOM variable below:...
Hi, I want to use sox to convert all my asterisk vice prompts to wav to preview and check what I can use for what.... There are litterally hundreds of files, so I hae so, and I have the file...
I have the apache logs in the following format: [Mon Jul 28 00:02:35 2008] [error] [client 99.99.99.99] File does not exist: /home/abc.xyz.com/http/1.gif", referer: http://abc.xyz.com/ggg1...
hi!... can i replace the first two string or number's using sed? or even on regular expression?.. example: 091234567894 and it will convert to :  6391234567894 The 09 only will conver...
Hi, I would like to create a shell script that will touch a file and then input 5-10 lines of text. Thanx, Mike
Hello, I have the following bash code fragment: x=0 for i in $(locate $1) do     dnames[$x]=$(dirname $i)     let x=$x+1 done Which assigns the output of a locate command into th...
Hi there, I assume this will be trivially easy for someone who knows bash scripting.  In my .bashrc file, I have a bunch of statements to define aliases.  For example: alias more='less' ...
hello i am trying to link two shc encrypted files by linking, i mean put in the first one  "source /path for the second file" when not encrypted (the second one), they work perfectly but w...
I am new to script and learning . I am palnning to get raid status by processing the file /proc/mdstat . i have an out for cat /proc/mdadm ************************** Personali...
I'm trying to automate encrypting and adding passwords to PDFs via a BASH shell script in Linux.  Is there a command line utility that accomplishes this?
I do a daily mySQL dump on both of my linux servers and keep them for two weeks. My question is, in event of a semi-disaster (rogue php program trashes tables), so I just want to restore an i...
Hi, I'm currently writing my own useradd prog. User are required to input their name, pw, etc. But I have no idea how to encrypt the pw for etc/shadow in bash. Is there any command to do the w...
I've searched the web on basic bash, sed and awk scripting and can find nothing simple enough to answer this question: how do I copy and paste lines in a file?  I have a file containing the li...
Having these two scripts: +++++++ test ++++++++++ #! /bin/bash echo p1 = $1 echo p2 = $2 echo p3 = $3 +++++++++++++++++++++ +++++++ add_param ++++ #! /bin/bash ./test newparam...
I am trying to write a shell script which I will later put in cron for checking server load and if server load is more then 10, it will restart mySQL. Presently if I comment line number 7,...
I'm trying to write a shell script (bash) which simply takes a list of directories (using ls) and passes them to a kdialog for a user to choose from. What i have so far works fine for direc...
I log into a remote server using ssh. Then I start a program in a background. When I exit ssh session the program terminates. How to keep it running?
Hello, I'm having difficulties getting the following to work.  I believe I had this script working before but can't remember how.  The original creator said something about removing sed and...