Search Results

Search: Posts Made By: dennis.jacob
22,801
Posted By dennis.jacob
Try : [[ -s "file" ]] && echo "Filesize not...
Try :

[[ -s "file" ]] && echo "Filesize not zero" || echo "Filesize zero"

Am not quite sure you are looking for the condition filesize is zero or records zero.
12,506
Posted By dennis.jacob
Try this: sed -n '/<TR/p' filename | sed...
Try this:

sed -n '/<TR/p' filename | sed 's/\(<TR><TD>\)\(.*\)\(<\/TD><TD>\)\(.*\)\(<\/TD><TD>\)\(.*\)\(<\/TD><TD>\)\(.*\)\(<\/TD><\/TR>\)/\2,\4,\6,\8/'


Input:


Output:
1,606
Posted By dennis.jacob
I guess you are not looking for SFTP , and not...
I guess you are not looking for SFTP , and not SMTP [for mailing].

Here is a sample SFTP program


sftp username/password@server_name <<EOF
lcd local_directory
cd remote_directory
put...
1,556
Posted By dennis.jacob
Instead of it, you can try: awk '{...
Instead of it, you can try:


awk '{ s=substr($0,1,3); print >"acc_"s;}' temp
23,748
Posted By dennis.jacob
sed 's/.*/&,file1/' file1 >temp mv temp...
sed 's/.*/&,file1/' file1 >temp
mv temp file1
18,216
Posted By dennis.jacob
One quick approch: grep -v "$(cat file1)"...
One quick approch:

grep -v "$(cat file1)" file2 | awk '{print $2}'
2,766
Posted By dennis.jacob
Try: find . -name "*" -type f | sed...
Try:

find . -name "*" -type f | sed 's!.*/!!g'
7,185
Posted By dennis.jacob
If I got you correctly,Try: awk 'NF>2 {...
If I got you correctly,Try:

awk 'NF>2 { print $1" "$2; $1=$2=""; print; }' file
4,825
Posted By dennis.jacob
Try: awk '/DETY/ { s=""; s=$1" "$2; } /SP=/...
Try:

awk '/DETY/ { s=""; s=$1" "$2; } /SP=/ {s=s" "$3; } /MGG=/ { s=s" "$1; } /END/ { print s; }' file
8,079
Posted By dennis.jacob
Either you can - source the .profile before...
Either you can

- source the .profile before calling the script
eg: * * * * * ./.profile; sh script.sh

- or, call the .profile inside your script.
1,846
Posted By dennis.jacob
Try: cmd="fred=999" eval $cmd echo...
Try:

cmd="fred=999"
eval $cmd
echo $fred
Showing results 1 to 11 of 11

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