Search Results

Search: Posts Made By: prajith78
2,427
Posted By prajith78
hey raom, thanks for introducing 'paste'....
hey raom,

thanks for introducing 'paste'. its new for me.

regards
prajit
6,347
Posted By prajith78
the following code will insert content at every...
the following code will insert content at every 5th line.
awk ' {if ((NR%5)==0) print "line to be printed\n" $0; else print $0;}' < data > out where data is the file which holds the data
and output...
80,270
Posted By prajith78
notice that 2 slashes before 'n' its sed...
notice that 2 slashes before 'n'

its sed s/,/\\n/g file1
NOT sed s/,/\n/g file1
80,270
Posted By prajith78
sed s/,/\\n/g file1
sed s/,/\\n/g file1
3,449
Posted By prajith78
the following code will give u the first row (ie...
the following code will give u the first row (ie a,e,i,m)


gawk -F ',' 'BEGIN {col=""}{ col=col $1 "," ; }END {print substr ( col,1,length ( col ) -1 ) }' file1


change '$1' as '$2' to get...
3,420
Posted By prajith78
BEGIN {lastString="";} { curStr=$0; if...
BEGIN {lastString="";}
{ curStr=$0;
if (substr(curStr,1,1)=="*") {
len = length(lastString);
print substr(lastString,1,len) substr(curStr,2);
}else{
print substr(curStr,1)
}...
17,443
Posted By prajith78
just concat with some other character just before...
just concat with some other character just before splitting.


$string = "name:blk:house::";
@res = split(/[:]/,$string.".");
print "size of array : $#res";
3,133
Posted By prajith78
there is a file /etc/passwd. locate the row...
there is a file /etc/passwd.
locate the row having ur user id in this file.
in that row, the 7th entry curresponds to your default shell.
change it to to the desired shell.
(provided you have...
Showing results 1 to 8 of 8

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