Search Results

Search: Posts Made By: Khanaza
2,205
Posted By Khanaza
Strange ,I am getting below $cat a abc def...
Strange ,I am getting below

$cat a
abc def 1 xyz zzz
bca cde 2 yyy xxx
$sed -e 's/\(.*\)\([[:digit:]]\)\(.*\)/\1\|\2\3/' a
abc def |1 xyz zzz
bca cde |2 yyy xxx
$
1,598
Posted By Khanaza
Its just a variable ,added to take any other...
Its just a variable ,added to take any other input that may present in the file ,
like
#1043 asd #Here asd will go to junk
If you are sure you have only one word per line ,you can skip this.
876
Posted By Khanaza
Use find, like cd directory while : do ...
Use find, like
cd directory
while :
do
FileChanged=`find . - mmin -15 -print |wc -l`
if [ $FileChanged -eq 0]
then
cat * >input/mergefiles_`date +%s`
fi
Sleep 15
done
1,346
Posted By Khanaza
I=1 for t in `cat out.txt` echo "create...
I=1
for t in `cat out.txt`
echo "create directory data_$i as" '"$t"' :"
i=`expr $i + 1`
done

---------- Post updated at 07:03 PM ---------- Previous update was at 07:02 PM ----------

The...
5,706
Posted By Khanaza
You can also use basename and the dirname to get...
You can also use basename and the dirname to get the output
basename /tmp/abc.txt will give abc.txt
dirname /tmp/abc.txt will give /tmp
Showing results 1 to 5 of 5

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