Search Results

Search: Posts Made By: manid
1,081
Posted By Don Cragun
If you're going to use two greps, with the fixed...
If you're going to use two greps, with the fixed strings needed for this project, grep -F (or fgrep) will be faster than egrep (or grep -E). I.e., try:
grep -F ' setting application ' file1.txt |...
7
1,946
Posted By RudiC
Not too far off. Tryfor i in ${arr[@]} do if...
Not too far off. Tryfor i in ${arr[@]}
do if [ $a -le $i ]
then echo "$i"
fi
done
5
6
7
8
9
10
11
12
Make sure there's spaces around the square brackets, and use...
1,093
Posted By clx
Is it just one line? Or the pattern is unique? ...
Is it just one line? Or the pattern is unique?

UID="admin"
PWD="password"

sed 's/^<UID.*PWD.*/UID = '\"$UID\"' PWD = '\"$PWD\"'>/' file
2,330
Posted By Don Cragun
According to the standards, ls -t|tail -n 10...
According to the standards, ls -t|tail -n 10 should give you the 10 newest files. And, ls -tr|tail -n 10 should give you the 10 oldest files.

However, on some systems, ls -t gives you...
Showing results 1 to 4 of 4

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