Sunday, February 14, 2010
use sed when ....
# insert a blank line above every line which matches "regex" sed '/regex/{x;p;x;}' OR sed '/regex/{x;G;}' # insert a blank line below every line which matches "regex" sed '/regex/G' # insert a blank line above and below every line which matches "regex" sed '/regex/{x;p;x;G;}' # remove the header of a file
sed '/1,1d' filename
Saturday, January 23, 2010
Basic UNIX Questions
All questions are for command line use in UNIX environments.
Q: How do you display your running kernel version? (Solaris, AIX, Linux)
A: Linux # uname –r , Solaris # showrev
Q: Which command do you use to display a table of running processes? (Solaris, AIX, Linux)
A: Linux # ps –ef and top , Solaris # prstat
Q: Which file do you modify to configure a domain name resolver? (Solaris, AIX, Linux)
A: Linux # /etc/resolv.conf , Solaris # /etc/resolv.conf
Q: Which file contains a list of locally defined hostnames and corresponding IP addresses? (Solaris, AIX, Linux)
A: Linux # /etc/hosts , Solaris # /etc/hosts and linked file /etc/inet/hosts
Q: How do you display a routing table? (Solaris, AIX, Linux)
A: Linux # ip route show or #netstat –nr or #route –n and Solaris # netstat –nr and #route -n
Q: Which command would you use to view partitions and their sizes on Solaris?
A: # df -kh
Q: Which OpenBoot command would you use to print/view OpenBoot environment variables on a SUN server?
A: #printenv
Q: What does "ypwhich" command do? (Solaris, AIX, Linux)
A: # Will display NIS server to which client is connected to and which NIS Server is master for particular map specified with this command
Q: which command would you use to create an OS user on Solaris and Linux?
A: Linux # useradd and Solaris #useradd
Q: Which file contains passwords for local users on Solaris, Linux and on AIX?
A: Linux #/etc/shadow and Solaris # /etc/shadow
Q: Which command would you use to list partitions on Linux?
A: Linux # mount –l or # df -kh
Q: Which command/commands would you use to manage installed packages on RedHat Linux?
A: Linux # rpm
Q: What is the default port for SSH server?
A: 22
Q: Which command/commands would you use to manage installed packages on Solaris?
A: #pkginfo #pkgrm # pkgadd #pkgchk
Q: What command would you use to install an OS patch on Solaris?
A: #showrev –p and #patchadd -p
Q: Which Veritas command would you use to display a list of Veritas volumes?
A: # vxprint
Q: Which Veritas command would you use to display a list of disks on a system?
A: # vxdx list
Q: What is the main system configuration utility in AIX?
A:
Q: Which file has a list of filesystems to be mounted at boot time on Solaris, Linux and AIX?
A: Linux # /etc/fstab and Solaris #/etc/vfstab
Q: How do you display your running kernel version? (Solaris, AIX, Linux)
A: Linux # uname –r , Solaris # showrev
Q: Which command do you use to display a table of running processes? (Solaris, AIX, Linux)
A: Linux # ps –ef and top , Solaris # prstat
Q: Which file do you modify to configure a domain name resolver? (Solaris, AIX, Linux)
A: Linux # /etc/resolv.conf , Solaris # /etc/resolv.conf
Q: Which file contains a list of locally defined hostnames and corresponding IP addresses? (Solaris, AIX, Linux)
A: Linux # /etc/hosts , Solaris # /etc/hosts and linked file /etc/inet/hosts
Q: How do you display a routing table? (Solaris, AIX, Linux)
A: Linux # ip route show or #netstat –nr or #route –n and Solaris # netstat –nr and #route -n
Q: Which command would you use to view partitions and their sizes on Solaris?
A: # df -kh
Q: Which OpenBoot command would you use to print/view OpenBoot environment variables on a SUN server?
A: #printenv
Q: What does "ypwhich" command do? (Solaris, AIX, Linux)
A: # Will display NIS server to which client is connected to and which NIS Server is master for particular map specified with this command
Q: which command would you use to create an OS user on Solaris and Linux?
A: Linux # useradd and Solaris #useradd
Q: Which file contains passwords for local users on Solaris, Linux and on AIX?
A: Linux #/etc/shadow and Solaris # /etc/shadow
Q: Which command would you use to list partitions on Linux?
A: Linux # mount –l or # df -kh
Q: Which command/commands would you use to manage installed packages on RedHat Linux?
A: Linux # rpm
Q: What is the default port for SSH server?
A: 22
Q: Which command/commands would you use to manage installed packages on Solaris?
A: #pkginfo #pkgrm # pkgadd #pkgchk
Q: What command would you use to install an OS patch on Solaris?
A: #showrev –p and #patchadd -p
Q: Which Veritas command would you use to display a list of Veritas volumes?
A: # vxprint
Q: Which Veritas command would you use to display a list of disks on a system?
A: # vxdx list
Q: What is the main system configuration utility in AIX?
A:
Q: Which file has a list of filesystems to be mounted at boot time on Solaris, Linux and AIX?
A: Linux # /etc/fstab and Solaris #/etc/vfstab
how to get patterns of file 1 "a" in file 2 "b"
#! /usr/bin/sh
while read line
do
grep $line b >>final
done<a
Print next 7 lines of the file sample2 after pattern match from file sample1:
for i in `cat sample1`;do sed -n "/$i/{p;n;p;n;p;n;p;n;p;n;p;n;p;n;G;p;}" sample2 ; done
Saturday, June 6, 2009
UNIX interview questions and best practices.....
Q1.Write a shell script in Linux to shift all characters in a file forward by five characters. (Thus "a" becomes "f'").
Solution: cat test tr '[a-z A-Z]' '[f-za-e F-ZA-E]'
Q2.I have 2 files:-
file1 and file2
file1
SEED
RPTT
TST8
file2
SEED:db:Y
RPTT:db:Y
SED8:db:N
SEED:db:N
TST8:db2:Y
TRN8:db3:N
CNV8:db4:Y
I have to change third field of file2 to "y" for every entry in file1 matches first filed of file 2
and rest to N
I want file 2 like :-
as file 1 has (SEED,RPTT,TST8) so in file2 I want to do third field "y" for those entries(which is first field in file2).
In rest I want to convert to "N"
SEED:db:Y
RPTT:db:Y
SED8:db:N
SEED:db:Y
TST8:db2:Y
TRN8:db3:N
CNV8:db4:N
Solution: while IFS=: read a b _ ; do echo -n "$a:$b:" ; ([[ $(grep -w $a file1.txt) ]] && echo Y) echo N ; done <>
Q3. How u convert string "hi manu how are you?" to "Hi Manu How Are You?"
Solution: echo "hi manu how are you"sed -e 's/ [a-z]/\U&/g'\;'s/^[a-z]/\U&/g'
OR
echo "hi manu how are you" sed 's/\<[a-z]*\>/\u&/g'
Q4. write a shell script that counts a number of unique word contained in the file and print them in alphabetical order line by line?
Solution: $ rm -f res res1 ; while read line ; do cat uniqtest grep -wc $line >>res1 ; echo "$line :-> Count=" >>res ;done final_temp ; cat final_tempsort -u >final ; rm -f res res1 final_temp1
(Check file "final" for output)
Q5. How to rename all the files in a folder having specific extension? Example: I have some files with extension (.txt) in a folder name 'Test'. I have to rename all the .txt files in a test and its subdirectories to .my extension.
Solution: for file in `ls` ; do NEW=`echo $file sed 's/.txt/.my/g'` ; mv $file $NEW ; done
Q6. write a shell script to identify the given string is palindrome or not?
Solution:
#! /usr/bin/sh
len=0
i=1
tag=0
echo -n "Enter a String: "
read str
len=`echo $str wc -c`
len=`expr $len - 1`
halfLen=`expr $len / 2`
while [ $i -le $halfLen ]
do
c1=`echo $strcut -c$i`
c2=`echo $strcut -c$len`
if [ $c1 != $c2 ] ; then
i=$halfLen
tag=1
fi
i=`expr $i + 1`
len=`expr $len - 1`
done
if [ $tag -eq 0 ]
then
echo "String is Palindrome"
else
echo "String is not Palindrome"
fi
Q7. one file is a.txt which has 4 fields/columns, where as each field has separated by space and that field contains some data like below
ram usa 105 25
rag uk 115 26
pat ind 234 23
sah 425 24
tat usa 344 28
rat brz 536 29
now i want only 2nd field data, that should be like this
usa
uk
ind
usa
brz
(i.e. It should print blank line for the second field if it doesnt have country defined)
Solution: awk 'NF < 4 {$2=""} { print $2 }' a.txt
Q8. How to change all .my files to .txt in current directory??
Solution: for i in `ls *.my` ; do NEW=`echo $ised -e 's/.my/.txt/g'` ; mv $i $NEW ; done
Q9. How to change all .extn files to .my in entire directory recursively??
Solution:
find ./ -type f grep ".extn$" >files.txt;for i in `cat files.txt`;do NEW=`echo $ised 's/.extn/.my/g'`;mv "${i}" "${NEW}";done;rm -f files.txt
Q10: What is umask??
Answer: umask is used to set default permission level in entire unix system. It can be set in .kshrc/.bashrc/.cshrc or init (So that to load at the time of login into shell)
Q11. What is inode??
Answer : inode represents any file/directory residing in your unix system with a numner known as inode number. It is unique for every file/dir. It is basically a reference that kernel use for any work related to that entity. "ls -i filename" will give you the inode number of that particu;ar file.
Q12. Explain general commands like ps,df, export, env, ufsdump, tar, cron, system.
Answer: EASY ONE
Q13. Explain the make utility in unix?? what are the parameters of a makefile and how to use them. What are macros in makefile.
Answer: Unix make utility is used to build a software package. It requires a makefile where all the bunch of the scripts/codes/programs are declared/defined. The main parameters of the make file are variable declaration, Macro declaration, Phony Target declaration and Clean-up block. Macros in a makefile represents the order in which the scripts would get executed.
Q14. What are the benefits of makefile over shell script??
Answer: Using makefile one can run the different scripts or programs or codes in one go. This can also be done by making a wrapper shell script which can execute the different scripts in one go. But then it would not be termed as a package because when we say a package it means that we have one installer (.exe) which can execute the bunch more efficiently and also this .exe will be in encrypted format. So in order to maintain efficiency and security makefile is given precedence over wrapper shell scripts.
Q15. What are hard links in UNIX??
Answer: A hard link is a reference to a file or directory that appears just like a file or directory, not a link. Hard links only work within a filesystem. In other words, don't use hard links between mounted filesystems. A hard link is only a reference to the original file, not a copy of the file. If the original file is deleted, the information will be lost.
To create a hard link of the file /export/home/fred/stuff to /var/tmp/thing, use:
ln /export/home/fred/stuff /var/tmp/thing
The syntax for creating a hard link of a directory is the same. To create a hard link of /var/www/html to /var/www/webroot, use:
ln /var/www/html /var/www/webroot
Q16. What are the soft/symbolic links in unix ??
Answer: A symbolic link is a pointer to another file or directory. It can be used just like the original file or directory. A symbolic link appears in a long listing (ls -l) with a reference to the original file/directory. A symbolic link, as opposed to a hard link, is required when linking from one filesystem to another and can be used within a filesystem as well.
To create a symbolic link, the syntax of the command is similar to a copy or move command: existing file first, destination file second. For example, to link the directory /export/space/common/archive to /archive for easy access, use:
ln -s /export/space/common/archive /archive
To link the runtime control script /etc/init.d/httpd to /etc/rc2.d/S77httpd, use:
cd /etc/rc2.d
ln -s ../init.d/httpd S77httpd
Q17. What is a command to kill the last background job??
Answer: kill $!
Q18. Bring a job to foreground by specifying its job number after the percent sign.
Answer: fg %jobnumber
(Note: jobnumber can be obtained by using jobs -l command)
Q19. Explain top command.
Answer: top provides an ongoing look at processor activity in real time. It displays a listing of the most CPU-intensive tasks on the system, and can provide an interactive interface for manipulating processes. It can sort the tasks by CPU usage, memory usage and runtime. can be better configured than the standard top from the procps suite. Most features can either be selected by an interactive command or by specifying the feature in the personal or system-wide configuration file.
Q20. Write a script which give you those records which are having CPU utilization more than 80%.
Answer: df -k awk 'NR==1{print $1"\t"$5"\t"$6}sub("%","",$5){if($5 >= 80) print $1"\t"$5"%\t"$NF}'
Q21. How to pass arguments in an awk script??Answer: Using, cat a.txtawk -v awk_var="$shell_var" '{print $1 "\t" awk_var}'
e.g. #! /usr/bin/sh
var=$*
cat ussd.txt >offpeak_input.txt
cat offpeaknawk -v var1="$var" '{print "\"1-"$1"\"""""\""$2"\"""""1006"""""$3"""0""""-1""""-1""""\""var1" .Account balance is Rs..Bonus minutes.\""}'>>offpeak_input.txt
!!!!!!!!!! CHEEEEEEEEEEEERRRRRRRRRZZZZZZZZZZZZZZZZZZZZZZZZZ !!!!!!!!!!
Solution: cat test tr '[a-z A-Z]' '[f-za-e F-ZA-E]'
Q2.I have 2 files:-
file1 and file2
file1
SEED
RPTT
TST8
file2
SEED:db:Y
RPTT:db:Y
SED8:db:N
SEED:db:N
TST8:db2:Y
TRN8:db3:N
CNV8:db4:Y
I have to change third field of file2 to "y" for every entry in file1 matches first filed of file 2
and rest to N
I want file 2 like :-
as file 1 has (SEED,RPTT,TST8) so in file2 I want to do third field "y" for those entries(which is first field in file2).
In rest I want to convert to "N"
SEED:db:Y
RPTT:db:Y
SED8:db:N
SEED:db:Y
TST8:db2:Y
TRN8:db3:N
CNV8:db4:N
Solution: while IFS=: read a b _ ; do echo -n "$a:$b:" ; ([[ $(grep -w $a file1.txt) ]] && echo Y) echo N ; done <>
Q3. How u convert string "hi manu how are you?" to "Hi Manu How Are You?"
Solution: echo "hi manu how are you"sed -e 's/ [a-z]/\U&/g'\;'s/^[a-z]/\U&/g'
OR
echo "hi manu how are you" sed 's/\<[a-z]*\>/\u&/g'
Q4. write a shell script that counts a number of unique word contained in the file and print them in alphabetical order line by line?
Solution: $ rm -f res res1 ; while read line ; do cat uniqtest grep -wc $line >>res1 ; echo "$line :-> Count=" >>res ;done final_temp ; cat final_tempsort -u >final ; rm -f res res1 final_temp1
(Check file "final" for output)
Q5. How to rename all the files in a folder having specific extension? Example: I have some files with extension (.txt) in a folder name 'Test'. I have to rename all the .txt files in a test and its subdirectories to .my extension.
Solution: for file in `ls` ; do NEW=`echo $file sed 's/.txt/.my/g'` ; mv $file $NEW ; done
Q6. write a shell script to identify the given string is palindrome or not?
Solution:
#! /usr/bin/sh
len=0
i=1
tag=0
echo -n "Enter a String: "
read str
len=`echo $str wc -c`
len=`expr $len - 1`
halfLen=`expr $len / 2`
while [ $i -le $halfLen ]
do
c1=`echo $strcut -c$i`
c2=`echo $strcut -c$len`
if [ $c1 != $c2 ] ; then
i=$halfLen
tag=1
fi
i=`expr $i + 1`
len=`expr $len - 1`
done
if [ $tag -eq 0 ]
then
echo "String is Palindrome"
else
echo "String is not Palindrome"
fi
Q7. one file is a.txt which has 4 fields/columns, where as each field has separated by space and that field contains some data like below
ram usa 105 25
rag uk 115 26
pat ind 234 23
sah 425 24
tat usa 344 28
rat brz 536 29
now i want only 2nd field data, that should be like this
usa
uk
ind
usa
brz
(i.e. It should print blank line for the second field if it doesnt have country defined)
Solution: awk 'NF < 4 {$2=""} { print $2 }' a.txt
Q8. How to change all .my files to .txt in current directory??
Solution: for i in `ls *.my` ; do NEW=`echo $ised -e 's/.my/.txt/g'` ; mv $i $NEW ; done
Q9. How to change all .extn files to .my in entire directory recursively??
Solution:
find ./ -type f grep ".extn$" >files.txt;for i in `cat files.txt`;do NEW=`echo $ised 's/.extn/.my/g'`;mv "${i}" "${NEW}";done;rm -f files.txt
Q10: What is umask??
Answer: umask is used to set default permission level in entire unix system. It can be set in .kshrc/.bashrc/.cshrc or init (So that to load at the time of login into shell)
Q11. What is inode??
Answer : inode represents any file/directory residing in your unix system with a numner known as inode number. It is unique for every file/dir. It is basically a reference that kernel use for any work related to that entity. "ls -i filename" will give you the inode number of that particu;ar file.
Q12. Explain general commands like ps,df, export, env, ufsdump, tar, cron, system.
Answer: EASY ONE
Q13. Explain the make utility in unix?? what are the parameters of a makefile and how to use them. What are macros in makefile.
Answer: Unix make utility is used to build a software package. It requires a makefile where all the bunch of the scripts/codes/programs are declared/defined. The main parameters of the make file are variable declaration, Macro declaration, Phony Target declaration and Clean-up block. Macros in a makefile represents the order in which the scripts would get executed.
Q14. What are the benefits of makefile over shell script??
Answer: Using makefile one can run the different scripts or programs or codes in one go. This can also be done by making a wrapper shell script which can execute the different scripts in one go. But then it would not be termed as a package because when we say a package it means that we have one installer (.exe) which can execute the bunch more efficiently and also this .exe will be in encrypted format. So in order to maintain efficiency and security makefile is given precedence over wrapper shell scripts.
Q15. What are hard links in UNIX??
Answer: A hard link is a reference to a file or directory that appears just like a file or directory, not a link. Hard links only work within a filesystem. In other words, don't use hard links between mounted filesystems. A hard link is only a reference to the original file, not a copy of the file. If the original file is deleted, the information will be lost.
To create a hard link of the file /export/home/fred/stuff to /var/tmp/thing, use:
ln /export/home/fred/stuff /var/tmp/thing
The syntax for creating a hard link of a directory is the same. To create a hard link of /var/www/html to /var/www/webroot, use:
ln /var/www/html /var/www/webroot
Q16. What are the soft/symbolic links in unix ??
Answer: A symbolic link is a pointer to another file or directory. It can be used just like the original file or directory. A symbolic link appears in a long listing (ls -l) with a reference to the original file/directory. A symbolic link, as opposed to a hard link, is required when linking from one filesystem to another and can be used within a filesystem as well.
To create a symbolic link, the syntax of the command is similar to a copy or move command: existing file first, destination file second. For example, to link the directory /export/space/common/archive to /archive for easy access, use:
ln -s /export/space/common/archive /archive
To link the runtime control script /etc/init.d/httpd to /etc/rc2.d/S77httpd, use:
cd /etc/rc2.d
ln -s ../init.d/httpd S77httpd
Q17. What is a command to kill the last background job??
Answer: kill $!
Q18. Bring a job to foreground by specifying its job number after the percent sign.
Answer: fg %jobnumber
(Note: jobnumber can be obtained by using jobs -l command)
Q19. Explain top command.
Answer: top provides an ongoing look at processor activity in real time. It displays a listing of the most CPU-intensive tasks on the system, and can provide an interactive interface for manipulating processes. It can sort the tasks by CPU usage, memory usage and runtime. can be better configured than the standard top from the procps suite. Most features can either be selected by an interactive command or by specifying the feature in the personal or system-wide configuration file.
Q20. Write a script which give you those records which are having CPU utilization more than 80%.
Answer: df -k awk 'NR==1{print $1"\t"$5"\t"$6}sub("%","",$5){if($5 >= 80) print $1"\t"$5"%\t"$NF}'
Q21. How to pass arguments in an awk script??Answer: Using, cat a.txtawk -v awk_var="$shell_var" '{print $1 "\t" awk_var}'
e.g. #! /usr/bin/sh
var=$*
cat ussd.txt >offpeak_input.txt
cat offpeaknawk -v var1="$var" '{print "\"1-"$1"\"""""\""$2"\"""""1006"""""$3"""0""""-1""""-1""""\""var1" .Account balance is Rs.
!!!!!!!!!! CHEEEEEEEEEEEERRRRRRRRRZZZZZZZZZZZZZZZZZZZZZZZZZ !!!!!!!!!!
Labels:
awk,
linux,
sed,
shell,
unix,
UNIX best practices.,
UNIX interview questions
Friday, May 8, 2009
Daily Purpose sed commands
Replace Text : sed -e "s/Old/New/g"
Remove Text : sed -e "s/Text//g"
Remove Text From Front : sed -e "s/^Text//g"
Remove Text From End :
sed -e "s/Text\$//g"
sed -e 's/Text$//g'
Insert Text in Front : sed -e "s/^/Text/g"
Append Text to End :
sed -e "s/\$/Text/g"
sed -e 's/$/Text/g'
Truncate :
sed -e "s/Text.*//"
cut -c5-8
Downshift and Upshift :
tr '[A-Z]' '[a-z]'
tr '[a-z]' '[A-Z]'
Change Tabs to Spaces : sed -e "s/<tab>/ /g"
Change Multiple Spaces to a Single Space :
sed -e "s/ */ /g"
Change Whitespaces to a Single Space :
sed -e "s/[<tab><space>][<tab><space>]*/<space>/g"
Delete Leading Whitespaces:
sed -e "s/^[<tab><space>]*//g"
Delete Trailing Whitespaces:
sed -e 's/[<tab><space>]*$//g'
Delete Lines:
sed -e "/Text/d"
grep -v "Text"
Delete Empty Lines:
sed -e '/^*$/d'
sed -e '/^[<tab><space>]*$/d'
Delete First Line:
sed -e '1d'
sed -e '1,7d'
Delete Last Line : sed -e '$d'
Print First Line :
sed -n '1p'
sed -e '2,$d'
sed -e '1q'
Print Last Line :
sed -n '$p'
Delete Comments :
sed -e '/^#/d'
sed -e 's/#.*//'
Delete Text Between Keywords :
sed -e '/Keyword1/,/Keyword2/d'
sed -e '/^Keyword1$/,/^Keyword2$/d'
Extract Text Between Keywords :
sed -e '/^Keyword1$/,/^Keyword2$/!d'
Print Odd Lines : cat -n file | sed -e '/.....[02468]/d' -e 's/^.......//'
Print Even Lines : cat -n file | sed -e '/.....[13579]/d' -e 's/^.......//'
Read a File Backwards : cat -n file | sort -nr | sed 's/^.......//'
Convert < > into LTGT : cat $* | sed -e 's/</\</g' -e 's/>/\>/g'
Remove Text : sed -e "s/Text//g"
Remove Text From Front : sed -e "s/^Text//g"
Remove Text From End :
sed -e "s/Text\$//g"
sed -e 's/Text$//g'
Insert Text in Front : sed -e "s/^/Text/g"
Append Text to End :
sed -e "s/\$/Text/g"
sed -e 's/$/Text/g'
Truncate :
sed -e "s/Text.*//"
cut -c5-8
Downshift and Upshift :
tr '[A-Z]' '[a-z]'
tr '[a-z]' '[A-Z]'
Change Tabs to Spaces : sed -e "s/<tab>/ /g"
Change Multiple Spaces to a Single Space :
sed -e "s/ */ /g"
Change Whitespaces to a Single Space :
sed -e "s/[<tab><space>][<tab><space>]*/<space>/g"
Delete Leading Whitespaces:
sed -e "s/^[<tab><space>]*//g"
Delete Trailing Whitespaces:
sed -e 's/[<tab><space>]*$//g'
Delete Lines:
sed -e "/Text/d"
grep -v "Text"
Delete Empty Lines:
sed -e '/^*$/d'
sed -e '/^[<tab><space>]*$/d'
Delete First Line:
sed -e '1d'
sed -e '1,7d'
Delete Last Line : sed -e '$d'
Print First Line :
sed -n '1p'
sed -e '2,$d'
sed -e '1q'
Print Last Line :
sed -n '$p'
Delete Comments :
sed -e '/^#/d'
sed -e 's/#.*//'
Delete Text Between Keywords :
sed -e '/Keyword1/,/Keyword2/d'
sed -e '/^Keyword1$/,/^Keyword2$/d'
Extract Text Between Keywords :
sed -e '/^Keyword1$/,/^Keyword2$/!d'
Print Odd Lines : cat -n file | sed -e '/.....[02468]/d' -e 's/^.......//'
Print Even Lines : cat -n file | sed -e '/.....[13579]/d' -e 's/^.......//'
Read a File Backwards : cat -n file | sort -nr | sed 's/^.......//'
Convert < > into LTGT : cat $* | sed -e 's/</\</g' -e 's/>/\>/g'
Thursday, March 12, 2009
awk oneliners explained
At below link the famous awk one liners by Eric Pement is explained.
http://www.catonmat.net/blog/awk-one-liners-explained-part-one/
http://www.catonmat.net/blog/awk-one-liners-explained-part-one/
Wednesday, October 29, 2008
SED One liners explained .....
Below is the link, helpful in understanding most of the sed onliners :
http://www.catonmat.net/blog/sed-one-liners-explained-part-one/
Thanks.
Manu
http://www.catonmat.net/blog/sed-one-liners-explained-part-one/
Thanks.
Manu
Subscribe to:
Posts (Atom)
