Search Results

Search: Posts Made By: samupnl
6,479
Posted By ygemici
[root@sistem1lnx ~]# cat google google ...
[root@sistem1lnx ~]# cat google
google
[root@sistem1lnx ~]# ./script google
g
go
goo
goog
googl
google


cat script
#!/bin/bash
xcount=$( (cat google | grep -o "." | wc -l) )
for i in...
6,479
Posted By pseudocoder
fold -w1 file | perl -nle 'push @x, $_; print @x'
fold -w1 file | perl -nle 'push @x, $_; print @x'
6,479
Posted By Scrutinizer
awk '{s="";for(i=1;i<=NF;i++)print s=s$i}' FS=...
awk '{s="";for(i=1;i<=NF;i++)print s=s$i}' FS= infile
6,479
Posted By zaxxon
$> awk '{for(x=1;x<=length($0);x++){print...
$> awk '{for(x=1;x<=length($0);x++){print substr($0,0,x)}}' file
g
go
goo
goog
googl
google


Your post looks a bit like homework, if this is the case obeye the forum rules for posting...
Showing results 1 to 4 of 4

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