10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Good Afternoon Team -
I"m asking for assistance on a piece of code to populate two values in an XML file. I have it working perfectly using CScript for DOS, but I have a need to do that same process in a Linux environment.
Here is the XML I need to modify:
<?xml version="1.0"... (5 Replies)
Discussion started by: SIMMS7400
5 Replies
2. Shell Programming and Scripting
Hi All,
I am trying to find out awk one liner for the following requirement but failed in doing that.
I have two files.
Content of first file:
file1.txt SUCCESS A
file2.txt SUCCESS B
file3.txt SUCCESS A
file4.txt FAIL ... (7 Replies)
Discussion started by: angshuman
7 Replies
3. Shell Programming and Scripting
Hi Guys,
I've got a script that runs and collects statistics from one of our machines and outputs the data into a csv file. Now, that script runs fine and I managed to create another one (with a lot of help from this forum!!) to trim the csv file down to all the data that I need, rather than all... (9 Replies)
Discussion started by: jimbob01
9 Replies
4. Shell Programming and Scripting
I have a list of filenames that I want created - they must be created via a certain naming convention due to the software I'm using. Once they are created I have another file that will be used to populate them with data. So far this is what I have:
#For each line in text file "foo_txt" create... (2 Replies)
Discussion started by: MaindotC
2 Replies
5. Shell Programming and Scripting
Hi.
I am trying to populate an array using eval in the background within a function. So this function will create a list of 3 character directories from SVN and store in an array. I want to call this function when the script starts in the background unknown to the user.
The problem is that... (2 Replies)
Discussion started by: jmiaebrown
2 Replies
6. Shell Programming and Scripting
Hi,
I'm trying to populate bash script variable, data_size with the
size of the largest file in my current directory
data_size=$(ls -lS | grep -v "total" | head -1) | awk '{ print $5 }'
I've tried adding an echo before the call to awk
data_size=$(ls -l | grep -v "total" | head -1) |... (2 Replies)
Discussion started by: mark_s_g
2 Replies
7. Shell Programming and Scripting
Hi,
I've a php scirpt that calls in an external class. The external class, myClass, has several public and private functions.
There is one public function which derives a value that I want be able to bring it to the main php scirpt. Here is the code.
....snip....
include... (1 Reply)
Discussion started by: nitin
1 Replies
8. Shell Programming and Scripting
Hello
I am new to perl and learning ...can you please explain why am i getting this error...as myHash is defined right above the code and I think it should be avilable in the sub function.
Here is my code:
<code>
#!/usr/bin/perl
use warnings;
use strict;
%myHash=();
sub... (2 Replies)
Discussion started by: uandme2k2
2 Replies
9. Shell Programming and Scripting
Hi there
i am trying to pass the result of a remote command into a variable into my script
ie
#!/bin/sh
var = `ssh remote_box 'uname'`
echo $var
but all i get back is
./script.sh: var: not found
However when i add a -x to put it into diag mode i get the following
+ ssh... (2 Replies)
Discussion started by: hcclnoodles
2 Replies
10. Shell Programming and Scripting
Hello,
I am trying to use the awk getline command to populate an array from a flat file.
Has anyone done this before?
So we have file1:
a
b
c
d
I want to create an array like index that contains these four elements (8 Replies)
Discussion started by: penfold
8 Replies