![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| file reading through shell script | Dip | Shell Programming and Scripting | 4 | 10-21-2008 11:10 PM |
| Reading data from a file through shell script | Dip | Shell Programming and Scripting | 2 | 10-20-2008 01:51 PM |
| Shell Script -- problem reading backslash(\)!! | rossi143 | Shell Programming and Scripting | 2 | 04-04-2007 03:52 AM |
| Reading file names from a file and executing the relative file from shell script | anushilrai | Shell Programming and Scripting | 4 | 03-10-2006 05:25 AM |
| Reading a CSV file into shell variables problem | multidogzoomom | Shell Programming and Scripting | 6 | 10-11-2005 05:43 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
File reading problem via shell script
Hi,
Data file named parameter contains : DB=y Alter_def.sql Create_abc.sql SQL=y database.sql my_data.sql To read this file I use var_sql=$(awk -F= '$1 == "SQL" { print $2 }' parameter.txt) if [ $var_sql = "y" -o $var_sql = "Y" ] then sql_f_name=`grep "\.sql" parameter.txt` echo $sql_f_name fi So this code returns all the file name. But I want only database.sql my_data.sql these two file. Can any one suggesst me how can I get the desired result without changing the search string(`grep "\.sql" parameter.txt`). |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|