Search Results

Search: Posts Made By: archimedes
1,494
Posted By archimedes
hi.. try this... if [ $# != 2 ] then ...
hi.. try this...

if [ $# != 2 ]
then
echo "incorrect number of arguments. Exitting !!!"
exit 1;
fi

$# = the number of arguments that you are passing in the script.
here i...
2,370
Posted By archimedes
hi... check if a script with the same name is...
hi... check if a script with the same name is present in the parent directory and that you have permissions on that script.

./scriptname
will try to execute the script in the current directory....
2,056
Posted By archimedes
if your lookup file is delimited, then you need...
if your lookup file is delimited, then you need to mention the FieldSeparator (FS) i.e. FS="|" in the BEGIN block before the while loop begins and then reassign it to FS = " " after the while loop...
10,666
Posted By archimedes
Hi... a solution using awk awk '{ if(NR == 1)...
Hi... a solution using awk
awk '{
if(NR == 1)
print $0;
else if(NR != 1)
{
if($0 !~ /^TRAILER/)
{
if($0 ~ /^D/)
{
printf "%s\n", $0 ; next
}
else
{
}
}
else
{
last=$0;
}
Showing results 1 to 4 of 4

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