10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm exploring OpenBSD and want to stick to its default shell, which is ksh. My goal is for my regular user ("bruno") and root user to have a shared history file. However, it seems that when running as root, ksh refuses to write to a HISTFILE that is owned by non-root user. This illustrates the... (3 Replies)
Discussion started by: DevuanFan
3 Replies
2. Shell Programming and Scripting
Hi,
I'm struggling with very very simple task but dont know where I'm going wrong.
Have the following file numbers.txt
1
12
123
1234
12345
123456
1234567
12345678
123456789
1234567890
9876543210
987654321
98765432
9876543
987654
98765 (1 Reply)
Discussion started by: bobbygsk
1 Replies
3. Shell Programming and Scripting
Hello ,
Could anyone help me to define the string in regular expression way .
Below is my string
\rtf1\ansi\deff0{\fonttbl{\f0\fswiss Helv;}{\f1\fnil MS Sans Serif;}}
{\colortbl ;\red0\green0\blue0;}
\viewkind4\uc1\pard\cf1\lang1033\f0\fs16
The string will always start as \rtf1 and... (6 Replies)
Discussion started by: Pratik4891
6 Replies
4. Shell Programming and Scripting
Guys, i'm new to shell scripting. Here's what i need.
I need a shell script which would read a file containing only 1 line which never changes.
File containts -
SQL_Mgd_Svc_ELONMCL54496 |EMEA\brookkev, EMEA\fieldgra, EMEA\tidmamar, EMEA\attfiste, EMEA\baldogar, EMEA\clarkia2, EMEA\conwasha,... (9 Replies)
Discussion started by: butterfly20
9 Replies
5. Shell Programming and Scripting
What would be the regular expression that can search for a Pattern, having 8 characters out of which atleast 1 digit, 1 lower case, 1 upper case letter and 1 special character must be there. But these can occur at any place randomly. Please help me out.
I'm using find $dir -name "*.txt" -exec... (0 Replies)
Discussion started by: Pradeep Kr.
0 Replies
6. Shell Programming and Scripting
Hi,
I am new to scripting.
please help me in validating the user entered time Pattern
Here is the program
#!/bin/bash
validateTimeFormat()
{
checkTime=$1
timePattern="::"
if ]
then
echo "Valid time pattern"
return 1
else
echo "InValid time pattern"
return -1
fi
}
echo "Please... (2 Replies)
Discussion started by: vvenu88
2 Replies
7. Shell Programming and Scripting
Hi,
i am java guy and new to unix.
I want to validate date pattern using Regex expression
here is the sample program i have written.
#!/bin/sh
checkDate="2010-04-09"
regex="\\d{4}-\\d{2}-\\d{2}\$"
echo $regex
if ]
then
echo "OK"
else
echo "not OK"
fi
But the ouput is... (2 Replies)
Discussion started by: vvenu88
2 Replies
8. Shell Programming and Scripting
Hi All
I am using regular expressions to determine how to group certain data. I've included an example of the data below.
USD_SPTR_2Y_725.5_PUT_EUROPEAN_09Q1|USD||European|
CAD_NDX_10Yx1Y_5.5_PUT_EUROPEAN_09Q1|CAD||European|
The regular expressions I am using is as follows and this is... (5 Replies)
Discussion started by: kingpin2502
5 Replies
9. Shell Programming and Scripting
Hi,
Could any one let me know, how can I cut the last field in below mentioned line.
net,-hopcount,0,-netmask,255.255.255.0,,,,,192.168.37.0,10.253.0.1
net,-hopcount,0,-netmask,255.255.255.0,,,,,192.168.1.0,10.253.0.1 net,-hopcount,0,-netmask,255.255.255.0,,,,,192.168.38.0,10.253.0.1... (3 Replies)
Discussion started by: ajilesh
3 Replies
10. Shell Programming and Scripting
I am trying to use a pattern-list match in korn shell using a variable and it always seems to regard the pattern-list as a literal:
Using the directory names explicitly in the pattern-list works fine:
ls @(test|test1)/test.txt
and returns:
test/test.txt
Trying to use a variable for this... (2 Replies)
Discussion started by: partchimp
2 Replies