10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Consider the following code:
grep -o -e '^STEAM_::\d+$' workfile3.tmp
A sample format of a valid string for the regexp would be:
STEAM_0:1:12345678
Here is an example line from the workfile3.tmp file:
465:L 01/02/2012 - 00:05:33: "Spartan1-1-7<8><STEAM_0:1:47539638><>" connected
No... (2 Replies)
Discussion started by: spinner0205
2 Replies
2. Shell Programming and Scripting
I am facing a problem while storring the grep results into a variable. I need to count the occurence of the pattern \, in a file and store that in a variable. I have given the below command
p=`grep -c '\\,' filename`
But while echoing the variable, i am getting the total number of lines in... (2 Replies)
Discussion started by: renjithv
2 Replies
3. Shell Programming and Scripting
Hello
This should be easy, but bash is giving me headaches.
At the command line the following command works:
duplicity --include /home --exclude '**' / file:///foo
Doing that from a script is not straightforward. Note that it is basically a requirement that I place the... (3 Replies)
Discussion started by: brsett
3 Replies
4. UNIX for Dummies Questions & Answers
I am still a novice at this stuff, but I have searched everywhere and I cant seem to get this working.
I am using a database program that I need to pull information from. The command I am using is the following.
search /project | grep "date -v -1m "+%Y-%m""
This returns no results, however... (1 Reply)
Discussion started by: trezero
1 Replies
5. Shell Programming and Scripting
I have a script which will take two file as the inputs and take the Value in file1 and search in file2 and give the output in Outputfile.
#!/bin/sh
#. ${HOME}/crossworlds/bin/CWSharedEnv.sh
FILE1=$1
FILE2=$2
for Var in $(cat $FILE1);do
echo $Var
grep -i "$Var" $FILE2
done > Outputfile
I... (2 Replies)
Discussion started by: SwapnaNaidu
2 Replies
6. UNIX for Dummies Questions & Answers
egrep -A 7 -m 2 -h 'Date:|Time:' *.html
this is showing only 2 line after the context of the 2nd found match. Is this a bug in grep?
egrep -A 7 -m 2 -h 'Time:' *.html - this works correctly (2 Replies)
Discussion started by: zer0
2 Replies
7. Shell Programming and Scripting
Anyone have an idea why this if statement does not work correctly?
"test2.sh" 18 lines, 386 characters
#!/usr/bin/sh
WARNING=80
CRITICAL=95
check_it()
{
if ] || ];then
echo "YES ] || ]"
else
echo "NO ] || ]"
fi
}
check_it 80.1
check_it 81.1 (3 Replies)
Discussion started by: 2dumb
3 Replies
8. UNIX for Dummies Questions & Answers
Here is the file named tuwork..........
209 200 WZ 6529 SKTNCA01X4X C POI LODI LODI 738 SKTNCA0127T LOD
Here is the scipt.......
cat tuwork |
while
read rva
do
num=`echo $rva | cut -d" " -f1-2`
reg=`echo $rva | cut -c10`
ocn=`echo $rva | cut -c12-15`
x=`echo $rva | cut -c29`... (3 Replies)
Discussion started by: shorty
3 Replies
9. HP-UX
i've same failure too, but this command boot pri isl
not work/not found
Thanks! (1 Reply)
Discussion started by: pantas manik
1 Replies
10. UNIX for Dummies Questions & Answers
I am an intern at a company with an HP visualize C160 running HP-UX B.10.20. It has stopped booting to the gui and, after some coaxing, will end up at a text-based menu screen but virtually nothing can be run from there.
At first the computer ran through it's boot process then stopped at this... (5 Replies)
Discussion started by: intern
5 Replies