Hi all,
How can I starndarzied string column to have the same column length for each
row.
Example
filename
A135953
D10036050
C135858000
I want add leading zeros and the column length should be 10
I tried
awk '{ printf "%010s \n", $1}' filename
Got all zeros
00
00
000
Hi all,
I have one folder and this folder contains several folders. Each sub folders
contains 5 or 6 files. So i want count the number of rows within each
file and produce an output.
Assume the main folder called A and it has three subfolders folder1,
folder2 and folder3.
Folder1 has
John,
After trail and error the following works for me but still has to be
refined.
find . -type f | while read i; do echo -e "$(dirname ${i}}} | cut -b 3-)
$(basename ${i}) $(wc -l ${i})" ; done | cut -d " " -f 1,2,3
1. All the folders that I am interested in are all starts with number
2.
Hi all,
Thank you very much for providing me more information, I am getting more
confused. but learning more.
I tried this one, but failed if the folder has more than one file name (eg
*.csv) in that folder.
find . -maxdepth 2 -mindepth 2 -type f -name '*.csv' -o -name '*.txt' |\
egrep '^\./[0
Here is another problem with the following script
find . \( -iname '*.txt' -o -iname '*.csv' \) -exec bash -c '
for f; do
IFS=/ read -ra part <<< "$f"
printf "%-10.10s %-10.10s %-20.20s %5d\n" \
"${part[1]}" "${part[2]}" "${part[3]}" "$(wc -l < "$f")"
done
' _ {} +
_: -c
Thank you very much!
So easy, I am just learning about bash scripting.
date -d 'next month' +%b%Y
What would happen in December 2016. Will it give me Jan2017?
Val!
On Sunday, January 24, 2016 5:31 PM, Dave Rutherford
wrote:
On Sun, Jan 24, 2016 at 5:30 PM, Val Krem wrote:
>