10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Below is my ksh shell script where I need to check if variable fileprops is a subset of $1 argument.
echo "FILE PROPERTY: $fileprops"
echo "PARAMETER3: $1"
if ; then
echo "We are Good. $line FILE is found to be INTACT !! "
else
echo... (2 Replies)
Discussion started by: mohtashims
2 Replies
2. Shell Programming and Scripting
I stumbled upon a problem, which I simplified to this:
There is a list of numbers, stored in variable $LIST, lets use `seq 5 25` for demonstration.
There is a number that should be compared against this list. For demonstration I use user input - read VALUE
I am trying to compare RegEx... (2 Replies)
Discussion started by: Zorbeg
2 Replies
3. Shell Programming and Scripting
Hi to you all,
I'm just struggling with a regex problem and I'm pretty sure that I'm missing sth obvious... :confused:
I need a regex to feed my grep in order to find lines that contain one string but not the other.
Here's the data example:
2015-04-08 19:04:55,926|xxxxxxxxxx| ... (11 Replies)
Discussion started by: stresing
11 Replies
4. Shell Programming and Scripting
Here is the sample code:
str1="abccccc"
str2="abc?"
if ]; then
echo "same string"
else
echo "different string"
fi
Given that ? implies 0 or 1 match of preceding character, I was expecting the output to be "different string", but I am seeing "same string".
Am I not using the... (3 Replies)
Discussion started by: Rameshck
3 Replies
5. UNIX for Dummies Questions & Answers
Hi there,
I really didn't want to have to waste people's time and ask this, but after 2 hours and running out of my own time I've decided to ask..
Basically I have a file in the format:
word: other words; more words here; last word
word: more words here; last word
(etc) x 100
Where the... (3 Replies)
Discussion started by: maximus73
3 Replies
6. Shell Programming and Scripting
Hi,
I've a logfile which i need to parse and get the logs depending upon the user input. here, i'm providing an option to enter the string which can be matched with the log entries.
e.g. one of the logfile entry reads like this -
$str = " mpgw(BLUESOAPFramework):... (6 Replies)
Discussion started by: butterfly20
6 Replies
7. Shell Programming and Scripting
My input contains a single word lines.
From each line
data.txt
prjtestBlaBlatestBlaBla
prjthisBlaBlathisBlaBla
prjthatBlaBladpthatBlaBla
prjgoodBlaBladpgoodBlaBla
prjgood1BlaBla123dpgood1BlaBla123
Desired output -->
data_out.txt
prjtestBlaBla
prjthisBlaBla... (8 Replies)
Discussion started by: kchinnam
8 Replies
8. Shell Programming and Scripting
Hi there, i wonder, is it possible to use regular expressions to partially select a string?
I have a bunch of server names which look like this
server1z-test
server2z2
server45z-primary
server13z3
I want to extract up to and including the 'z' in the server name, so for example
... (4 Replies)
Discussion started by: hcclnoodles
4 Replies
9. Shell Programming and Scripting
I'm working on a basic log parser in perl. Input file looks like:
len: 120713
foo
bar
file size of: testdir1/testdir1/testdir1/testdir1/testfile0 is 120713Of course there are tens of thousands of lines... I'm trying to compare the len and filesize values.
#!/usr/bin/perl
use strict;
use... (2 Replies)
Discussion started by: dkozel
2 Replies
10. UNIX for Dummies Questions & Answers
Hello!
I have problems with syntax...
I want a variable, that contains regex... is it possible?
Like $ a='.+->.+' and then use it in index ($0, "a").
I guess it won't work...
thank you :) (4 Replies)
Discussion started by: alias47
4 Replies