I get same error. That is way asked where to place the new code. I was testing it before an I keep on getting the same error. I don't understand what the error message states.
Last edited by Warrior232; 09-10-2005 at 01:16 PM..
UsedComputersRUs Menu- Search Computer
======================================
Enter computer to search for: sony
grep can't open 4
/studes/LAC220/g1ae020/sample_data.txt 016 18-12-2005 Sony Centrino-1.6Ghz 2000.00
/studes/LAC220/g1ae020/sample_data.txt 017 18-01-2006 Sony Centrino-1.6Ghz 5000.00
/studes/LAC220/g1ae020/sample_data.txt 020 22-02-2006 Sony Centrino-1.6Ghz 2000.00
/studes/LAC220/g1ae020/sample_data.txt 022 03-04-2005 Sony Centrino- 1.6Ghz 3500.00
/studes/LAC220/g1ae020/sample_data.txt 023 26-06-2006 Sony Centrino- 1.6Ghz 2345.00 ./search.txt[26]: -: not found exitCode=127
Press ENTER to continue...
This is the output the I get from below code. However I still dont get the "No Matching Records Found" when a record does not exist.
UsedComputersRUs Menu- Search Computer
======================================
Enter computer to search for: sony
016 18-12-2005 Sony Centrino-1.6Ghz 2000.00
017 18-01-2006 Sony Centrino-1.6Ghz 5000.00
020 22-02-2006 Sony Centrino-1.6Ghz 2000.00
022 03-04-2005 Sony Centrino- 1.6Ghz 3500.00
023 26-06-2006 Sony Centrino- 1.6Ghz 2345.00 exitCode=0
Press ENTER to continue...
I want to find and replace string from files present in one directory.
user will input the string to be searched and to replace .
Here is my program but Not working
echo "Enter Old domain name:"
read old
echo "Enter New domain name:"
read new
grep -rl '$old' /var/www/ | xargs sed -i... (4 Replies)
please help me to execute a simple shell script like
for i in `ls
echo $i
done
. i dont want to create a new sh file to execute it. Can i just type and execute it ? because I always this kind of simple for loops .
Please help .
Thanks (7 Replies)
Warning! I'm ridiculously new at all this, so pardon my ignorance...
I have a very simple script which is intended to search a hosts file when given a partial hostanme or ip address. The if the partial hostname/ip given is unique, the script automatically logs the user in to that host. If... (6 Replies)
Hello forum memebers.
can you correct the simple while program.
#! /bin/ksh
count=10
while
do
echo $count
count='expr$count-1'
done
I think it will print 10 to 1 numbers but it running for indefinite times. (2 Replies)
Hi all,
I have set up a simple awk script to calculate the average of values that are printed out a number of times per second (the number of time the printing occurs varies). The data is of the format shown below:
1 4.43
1 3.65
1 2.45
2 7.65
2 8.23
2 5.65
3 4.65
3 6.21
.. ..
120... (4 Replies)
Hi everyone, I am facing to one shell script problem, which is as following
Write a shell script that:
Takes a number of arguments.
For each argument, print out all files in the current directory that contain this substring in their name.
I know I need to use grep for the second... (7 Replies)
Hi everyone - I am sure this is a really simple problem but I'm a total noob at Linux scripting:
I wanted to create a script that allows me to compare the current week number to the contents of a text file in my home directory:
VAR1='date +%V'
VAR2='cat /home/fred/file.txt'
... (6 Replies)
hi all. i have a little problem. im basically reading input from the user from the keyboard into the variable "phonenumber". I want to do a little error check to check if the user doesnt enter anything in for the value phonenumber.
i had this:
read phonenumber
if
then
.....
else
........ (2 Replies)