Search Results

Search: Posts Made By: stobo
1,810
Posted By stobo
you guys are awesome !!!
you guys are awesome !!!
1,810
Posted By stobo
Nslookup how to remove interactive prompt
I am running this command

$ echo -en "set q=any\nwww.google.com\nexit\n" | nslookup | grep AAAA
> > > www.google.com has AAAA address 2607:f8b0:400c:c01::93

Can someone help to remove...
17,372
Posted By stobo
You can try this, should work for html/txt...
You can try this, should work for html/txt message body with multiple attachments


#!/usr/bin/bash
#
# send_mail_html.sh (send_mail_html/txt_body_plus_attachments)
#U
#U Usage:
#U ...
12,160
Posted By stobo
paste -d'~' - - <myfile | tr -s ' '| sed -e s/\...
paste -d'~' - - <myfile | tr -s ' '| sed -e s/\ \~/\~/g -e s/\~\ /\~/g
20,400
Posted By stobo
change line echo $year$month to printf...
change line
echo $year$month
to
printf '%s%2s' $year $month | tr ' ' '0'

you might find this useful too
datecalc (https://www.unix.com/showthread.php?s=&postid=16559#post16559)
19,963
Posted By stobo
# of empty lines grep -n ^$ filename | wc -l ...
# of empty lines grep -n ^$ filename | wc -l
lines that are empty grep -n ^$ filename | tr -d :
...
to remove all empty lines
grep -v ^$ filename >newfilename
3,650
Posted By stobo
#!/bin/ksh REMOVE=$1 cat test.in | tr...
#!/bin/ksh

REMOVE=$1

cat test.in | tr '\|' '\n' | grep -v ^$ | grep -v "$REMOVE" | tr '\n' '\|'
echo

exit 0
3,839
Posted By stobo
how about this: > AFIRST="CJKA|2005-12-10...
how about this:

> AFIRST="CJKA|2005-12-10 08.01.30.000000|1111111111|ECI|1112221111|1113331111|1114441111"
> BTHREE="CJKA|2005-12-10...
5,376
Posted By stobo
oneliner: bash> OIFS=$IFS; IFS=: ; while...
oneliner:

bash> OIFS=$IFS; IFS=: ; while read name rest; do echo ${rest} | tr ',' '\n' | sed s/^/$name\:/g; done <your_data_filename; IFS=$OIFS

script1:
#!/usr/bin/bash...
15,730
Posted By stobo
here is oneliner bash> for i in `find ....
here is oneliner

bash> for i in `find . -name '* *' | tr -d './' | tr ' ' '~'`; do mv "$(echo $i| tr '~' ' ')" "$(echo $i | tr '~' '_')"; done

assuming there is no "~" in the filenames
53,254
Posted By stobo
cat file1 | cut -d',' -f1,2,5-9,11 >file2 ...
cat file1 | cut -d',' -f1,2,5-9,11 >file2

awk and sed use more system resources, i might be mistaken, if so, then correct me ...
53,254
Posted By stobo
cat file | cut -d',' -f1,3
cat file | cut -d',' -f1,3
3,997
Posted By stobo
here is quick wrapper for datecalc script to get...
here is quick wrapper for datecalc script to get date in YYYYmmdd format

bash> printf '%s%2s%2s' $(./datecalc -a `date +'%Y %m %d'` - 35) | tr ' ' '0'
Showing results 1 to 13 of 13

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