Search Results

Search: Posts Made By: gaur.deepti
1,408
Posted By balajesuri
1. You need to learn how to use and manipulate...
1. You need to learn how to use and manipulate the grep command to search for specific patterns in a file (or input string).
2. To check if the file size is zero, you can use the test command or ...
1,408
Posted By RavinderSingh13
Hello Deepti, Following may help you, I...
Hello Deepti,

Following may help you, I didn't test it though, kindly try it and let me know if this helps.

VALUE=`awk '/Error/ || /Not valid/ || /YTF-/ {print $0}' filename`
if [[ -n $VALUE...
1,466
Posted By Yoda
How to pass arguments to a Bash-script...
How to pass arguments to a Bash-script (http://linux.about.com/od/Bash_Scripting_Solutions/a/How-To-Pass-Arguments-To-A-Bash-Script.htm)
1,980
Posted By itkamaraj
try this... find /edw/data/ -name '*.csv' ...
try this...

find /edw/data/ -name '*.csv' | while read myfile
do
awk -F, '{if(NF < 8) {exit 100;}}' $myfile
if [ "$?" -eq "100" ]
then
mv $myfile /edw/data/incorrect/ && echo "Move...
1,980
Posted By itkamaraj
try this... find /edw/data/ -name '*.csv' ...
try this...

find /edw/data/ -name '*.csv' | while read myfile
do
awk -F, '{if(NF < 8) {print "mv " FILENAME " /edw/data/incorrect/"; exit}}' $myfile | sh
done
1,980
Posted By itkamaraj
$awk '{if(NF < 8) {print "mv " FILENAME " /tmp/";...
$awk '{if(NF < 8) {print "mv " FILENAME " /tmp/"; exit} else {print $0}}' 1.csv | sh
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 01:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy