Advertisement

635 organizations, including eBay, Ericsson and Lockheed Martin, now work smarter with Corporate Accounts. Save up to 42%

 

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

 
Time Tested bash Solutions: 26 - 50 of 116
 
From the console, I am executing two or more commands, such as: $ ls >list.txt; sort list.txt >list2.txt; cat list2.txt if one command fails, the following commands are still executed. ...
I am trying to get a concept where I can create simultaneous running child processes from a parent and able to read their exit status as soon as they come in. Once the exit code is read it wil...
Hi Experts, I am writing a bash script to find the largest 5 files in my account, the script works fine but it ignores files having white space in their names, I need someone to help me to ...
i'm having to tweak a bash script, which I dont' know much about... this script, in turn, calls about 5 other shell scripts. i need the last shell script to return a variable to the calling...
Hi there! is it possible to remove all sort of code injection in a parameter? I have this ultra simple code, that uses the bash parameter in another command. I don't want that the user ha...
#!/usr/local/bin/perl use Shell; curl www.google.com > p.txt for $i (1,2,3,4,5) {         print "$i\n" } ========================================  When I run the above perl ...
Bash Script Question I want to write a short clean script that will have just one main body doing all the work, but will parse through 70+ times using a loop. I want to set up variables (proc...
Hello everyone, I´m working with a "job table" (mysql). In this table you can find different params that are being used for a php-script. This script works on my database and file operation...
i have a fortran header file: junk.h I want to insert this file into another file: bigfile.f whenever i see the line #     include "junk.h" Is there a way to do this using se...
hi, i'm currently trying to implement a bash script that will allow me to the following in a server with 3 network cards: - enable the 1st network card - perform a task (for example ping 1...
Hi guys hope u r well and can help. Im trying to build a perl (OR bash) script that will help me automate the process of creating new files based on what I have in the perl (or bash)script....
Hi guys hope u r well and can help. Pretty easy this one i hope. I have a list of files in a directory in the following format: menu3_career_resumes_examples.php   menu3_career_resume...
Given the following string: file="JYAX3-0501MT011027AAE2U2APP.jpg" Using a bash script I need to extract 011027 from it to use as a variable later in the script.  Using sed or awk how woul...
I wrote the following shell script to start multiple sqplus sessions running the same procedure. But is running one procedure after the other and not creating a new session, how do I make my s...
Can someone help me create a BASH shell script that reads a text file with entries like below. And creates a menu. Basicaly the script would read the txt file for the site names and output ...
Hi all, Can anyone please post sample code for database connection (Oracle or MySQL) using Shell Script. Please add comment for the scripts, so that I can easily understand the script. ...
I am using sed to match patterns in csv File. The csv file is as follows:  "VALUE";"VALUE";"VALUE";"VALUE";....... to replace a value i use: sed '2,4621s/[^;]*;/"'"$VALUE"'";/11' < fi...
I've been scratching my head a bit on this one (regex isn't my strong suit).  I am assigning output from a executable to a variable in my script as so: data=`$XM list -l | sed s/\(//g | sed...
Question about use of regular expressions on the linux command line (bash): Could someone explain why each of the following behave as they do? I am quite stumped: [Ignores the escaped ...
Hi: Consider I have a text file as this one in attached, and I need a tiny Bash script to just sort it by its first field (the numeric field) and display it in the screen. Questions: 1) ...
Ok so this is the .inf file I want the shell script to manipulate. An example of what I want it to do.... 4 Staticaly defined variables. $HOSTNAME ex. test01 -->  ComputerName $IP ex. ...
Briefly, I need help writing a bash shell script that can go into a directory (recursively) and extract all the .tar.gz archives it finds, and then pipe all of the extracted text files into a ...
Hi, I need some help with a script. The script needs to telnet to port 1010 and capture the output to a file with a date stamp. I will run it as a cron job. Thanks
Cannot export arrays to a subshell. Expot -a array and declare -x do not actuallly export an array in Bash. The array works fine in the shell it is created, but is blank in all subshells. If I...
Hello group, I'm in the middle of a development but an unexpected request has come and I have to read some elements in an XML file. How can I do this using Bash (using regular expression)? ...