Search Results

Search: Posts Made By: danish0909
1,971
Posted By jim mcnamara
a=$(find . -name '*.lis') if [ ! -z "$a" ] ;...
a=$(find . -name '*.lis')
if [ ! -z "$a" ] ; then
for fname in $a # have some files
do
echo $fname
done
else
echo 'no files found'
fi


Start with that. Without seeing your...
1,971
Posted By RudiC
The find command doesn't return anything, so the...
The find command doesn't return anything, so the variable i cannot assume any value and the do ... done branch is not executed.
3,698
Posted By radoulov
The files matching the pattern *GPX.Z are...
The files matching the pattern *GPX.Z are compressed text files or directories?
You could try:

find /comptel4/elink/backup1/output/vas/NG0/2013030[1-7]/ -type f -name '*GPX.Z' | xargs zgrep -f...
3,698
Posted By PikK45
Good find :) :b: Can this be eliminated by...
Good find :) :b:

Can this be eliminated by while like below?

while read i
do
find command
done < msisdn_u.txt

Will this cause the same? :wall:
3,698
Posted By alister
You will continue to trigger that error so long...
You will continue to trigger that error so long as the contents of the txt file in the highlighted command substitution exceed your system's available memory (or process mem limit).

Regards,...
1,327
Posted By pamu
You can modify your script.. for i in $(ls...
You can modify your script..

for i in $(ls -1)
do
length=$(awk 'END{printf "%036d", NR}' $i)
dur=$(awk '{s+=substr($0,85,9)}END{printf "%09d\n", s } ' $i)
#Please read more about sed...
3,636
Posted By Yoda
awk ' /^[0-9]/{s+=substr($0,85,9)}END{printf...
awk ' /^[0-9]/{s+=substr($0,85,9)}END{printf "%09d\n", s } ' filename
With code tags, the data looks different! No need for condition, just action:
awk '{s+=substr($0,85,9)}END{printf "%09d\n", s }...
2,414
Posted By gary_w
From left to right: sed -n...
From left to right:
sed -n "s/.*_\([0-9]\{8\}\).*\.jar$/\1/p"
sed - Stream editor
-n - Suppress normal action which is to print all lines
"s/ - Start search/replace pattern
. - Match...
Showing results 1 to 8 of 8

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