
Terminal - Commands using echo - 1,101 results
while read line; do echo -e "$line@mail.com"; done < list.txt
This is sample output - yours may be different.
$ while read line; do echo -e "$line@mail.com"; done < list.txt
john@mail.com
mark@mail.com
white@mail.com
lion@mail.com
robert@mail.com
Add @mail.com each line of a list
i=0; f=$(find . -type f -iregex ".*jpg");c=$(echo $f|sed "s/ /\n/g"| wc -l);for x in $f;do i=$(($i + 1));echo "$x $i of $c"; mogrify -strip $x;done
This is sample output - yours may be different.
echo 'ibase=10; obase=2; 127' | bc
This is sample output - yours may be different.
% echo 'ibase=10; obase=2; 127' | bc
1111111
% echo 'ibase=2; obase=1010; 1111111' |bc
127
% echo 'ibase=16; obase=A; FFFF' | bc
65535
% echo 'ibase=8; obase=12; 377' | bc
255
echo 16i `echo "F" | tr '[a-f]' '[A-F]'` p | dc ; echo 16o "15" p | dc
This is sample output - yours may be different.
for i in $(seq 1 50) ; do echo Iteration $i ; done
This is sample output - yours may be different.
Iteration 1
Iteration 2
Iteration 3
Iteration 4
Iteration 5
etc..
Optionally, one can use {1..50} instead of seq. E.g. for i in {1..50} ; do echo Iteration $i ; done
echo -n m{1..5}.cluster.net | xargs -d' ' -n1 -P5 -I{} ssh {} 'uptime'
This is sample output - yours may be different.
sudo echo 1 > /proc/acpi/asus/camera
This is sample output - yours may be different.
In some applications on eeepc xandros 7, default OS, video ccamera is not available untill you enter this command
echo "Xc" | tr "Xo" "\033\017
This is sample output - yours may be different.
now=`date +"%Y/%m/%d" -d "04/02/2005"` ; end=`date +"%Y/%m/%d" -d "07/31/2005"`; while [ "$now" != "$end" ] ; do now=`date +"%Y/%m/%d" -d "$now + 1 day"`; echo "$now"; done
This is sample output - yours may be different.
echo SSBMb3ZlIFlvdQo= | base64 -d
This is sample output - yours may be different.
alias scd='dirs -v; echo -n "select number: "; read newdir; cd -"$newdir"'
This is sample output - yours may be different.
$ cd programs/
$ cd
$ scd
0 ~
1 ~/programs
select number:
(sed 's/^/x+=/' [yourfile] ; echo x) | bc
This is sample output - yours may be different.
If you have a file full of numbers written line by line, you can sum every line to get the total.
With a file like this:
3443535
9878977
67554
987798
232324
you will got:
14610188
f="FILE";c="CMD";s="stat -f %m $f";t=`$s`;while [ 1 ];do if [ $t -eq `$s` ];then sleep 1;else echo `$c`;t=`$s`;fi;done
This is sample output - yours may be different.
echo '2^2^20' | time bc > /dev/null
This is sample output - yours may be different.
7.14user 0.00system 0:07.16elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+944minor)pagefaults 0swaps
This is a quick and dirty way to generate a (non-floating-point) CPU-bound task to benchmark. Adjust "20" to higher or lower values, as needed. As a benchmark this is probably a little less bogus than bogomips, and it will run anywhere 'bc' does.
myLongScript && echo -e '\a' || (echo -e '\a'; sleep 1; echo -e '\a')
This is sample output - yours may be different.
This will ring the system bell once if your script exits successfully and twice if it fails. So you can go look at something else and it will alert you when done. Don't forget to use 'xset b [vol [pitch [duration]]]' to get the bell to sound the way you want.
cd ~/.purple/logs/; egrep -ri "i can haz|pwn|l33t|w00|zomg" * | cut -d'/' -f 3 | sort | uniq | xargs -I {} echo "Note to self: ban user '{}'"
This is sample output - yours may be different.
Note to self, ban user 'aoluser'
Note to self, ban user 'msnuser'
Greps IRC logs for phrases and lists users who said them.
echo "import random; print(random.choice(['heads', 'tails']))" | python
This is sample output - yours may be different.
echo -n "search> ";read QUERY && wget -O - `wget -O - -U "Mozilla/5.0" "http://images.google.com/images?q=${QUERY}" 2>/dev/null |sed -e 's/","http/\n","http/g' |awk -F \" '{print $3}' |grep -i http: |head -1` > "$QUERY"
This is sample output - yours may be different.
prompts for a search term and then pulls down the first result from google images
echo -n search\>\ ; read SEARCH_STRING && sed -n "/$SEARCH_STRING/{n;p;n;p;n;p;q}" [file-to-search]
This is sample output - yours may be different.
$ echo -n search\>\ ; read SEARCH_STRING && sed -n "/$SEARCH_STRING/{n;p;n;p;n;p;q}" /etc/passwd
search> sshd
suse-ncc:x:105:107:Novell Customer Center User:/var/lib/YaST2/suse-ncc-fakehome:/bin/bash
uucp:x:10:14:Unix-to-Unix CoPy system:/etc/uucp:/bin/bash
uuidd:x:100:101:User for uuidd:/var/run/uuidd:/bin/false
customizable context searches - if you know sed, this is a basis for more complex context control than grep --context offers
echo | openssl s_client -connect www.google.com:443 2>/dev/null |openssl x509 -dates -noout
This is sample output - yours may be different.
remotely connects to an https site, fetches the ssl certificate and displays the valid dates for the cert
NAME=$(nslookup $IP | sed -n 's/.*arpa.*name = \(.*\)/\1/p'); test -z "$NAME" && NAME="NO_NAME"; echo "$NAME"
This is sample output - yours may be different.
for i in *.bak ; do nuname=`echo $i | sed 's/\.[^\.]*$//'`; echo renaming $i to $nuname;mv $i $nuname; done
This is sample output - yours may be different.
rename a pattern matched files by stripping off the extension
echo "SHOW PROCESSLIST\G" | mysql -u root -p | grep "Info:" | awk -F":" '{count[$NF]++}END{for(i in count){printf("%d: %s\n", count[i], i)}}' | sort -n
This is sample output - yours may be different.
echo "rm -rf /unwanted-but-large/folder" | batch
This is sample output - yours may be different.
job 6 at 2009-02-04 19:03
Good for one off jobs that you want to run at a quiet time. The default threshold is a load average of 0.8 but this can be set using atrun.
echo -e "[mysql]\npager=less -niSFX" >> ~/.my.cnf
This is sample output - yours may be different.
Changes standard mysql client output to 'less'.
In another words makes query results of mysql command line client to look much better.