Search Results

Search: Posts Made By: vnayak
6,570
Posted By fpmurphy
Not sure if such a thing is really possible with...
Not sure if such a thing is really possible with Bash.

Interestingly, the zsh shell has the ability to display things on the right hand side of a terminal. You can do the same things as with...
2,084
Posted By Don Cragun
For ls to perform colorization, it has to...
For ls to perform colorization, it has to determine the terminal type of the output device. The ls utility does this by trying to determine the terminal type of the file descriptor associated with...
3,164
Posted By Shahul
nawk -F'\\' 'OFS=":"{for(i=1;i<NF;i++)...
nawk -F'\\' 'OFS=":"{for(i=1;i<NF;i++) {if($i!~/^$/) print $i,length($i)}}' filename
folder name :12
folder1 :9
folder2 :9
folder3 :9
3,164
Posted By DGPickett
I was thinking: FolderLength FolderName ...
I was thinking:
FolderLength FolderName FullPath
3,164
Posted By getmmg
perl -F'\\' -lane 'for (@F){print $_ .":". length...
perl -F'\\' -lane 'for (@F){print $_ .":". length $_ if($_)}' names

Output:

folder name :12
folder1 :9
folder2 :9
folder3 :9
folder4:8
folder name :12
very long folder name :23
...
3,164
Posted By Shell_Life
!/usr/bin/ksh sed -e 's#\\#@#g' input_file |...
!/usr/bin/ksh
sed -e 's#\\#@#g' input_file | while read mLine
do
IFS='@'
for mFld in ${mLine}
do
echo "mFld <${mFld}> Length <${#mFld}>"
done
done
3,164
Posted By ctsgnb
$ pwd /export/home/admin/sand $ pwd | sed...
$ pwd
/export/home/admin/sand
$ pwd | sed 's:/:\\:g;s:^:\\:'
\\export\home\admin\sand
$ threshold=5
$ pwd | sed 's:/:\\:g;s:^:\\:' | nawk -F'\\' -v val="$threshold" '{for(i=0;++i<=NF;)...
4,771
Posted By rdcwayx
awk '$0=$0 FS length($2)' testAwk2.csv
awk '$0=$0 FS length($2)' testAwk2.csv
4,771
Posted By vgersh99
awk '{print $0, length($2)}' testAwk2.csv
awk '{print $0, length($2)}' testAwk2.csv
Showing results 1 to 9 of 9

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