Results 1 to 4 of 4
Hey Guys. Im having a lot of trouble with the following .
I have this data
================================
Arrival Date Manufacturer Price
================================
05/01/65 HP $140
04/2/05 Compaq $200
02/5/05 Test ...
- 10-17-2007 #1Just Joined!
- Join Date
- Oct 2007
- Posts
- 3
Need Help in Bash Script
Hey Guys. Im having a lot of trouble with the following .
I have this data
================================
Arrival Date Manufacturer Price
================================
05/01/65 HP $140
04/2/05 Compaq $200
02/5/05 Test $300
All data lines up...what i want to do is SORT by arrival date and manufacuter and price.
Example sort by arrival date (will just show arrival dates in another text file)
Ive tried using AWK command to look at "" then input files into a temp file but it never gives the correct data.
The other question is how would i get the user to specify a line delete.
Example i wanna delete line 2 (what code would do this?)
Any help would be much appreciated
))) .......
All i really need is the code how to sort data and show it and how to delete a row specifed by the user.
- 10-17-2007 #2Linux User
- Join Date
- Aug 2006
- Posts
- 458
show your awk code
- 10-17-2007 #3Just Joined!
- Join Date
- Oct 2007
- Posts
- 3
awk -f database.sh {print $1}
what I wanted that to do is look in the databse which has the information above and basically print the first column (All arrival dates)
I have just started with linux programming so im a 100% newbie.
So it would show
05/01/85
04/2/05
02/5/05
Is that command correct in bash?
- 10-17-2007 #4Just Joined!
- Join Date
- Oct 2007
- Posts
- 3
Not Showing User Input---> Need Help
Hi all,
using bash script
using this command:
echo -n "Please enter search data"
read $Data
awk '/$Data/ {Print $1}' database.sh
It shows nothing.....but if i put a value from the databse their
awk '/HP/ {Print $1}' database.sh it shows all data that has the words HP in it.
I want it to grab what the user put in and search for that.
Does anyone know how to program that and if im doing it wrong or not>


Reply With Quote