Script to restrict the length of the file name

i want to restrict the filename to 30 bytes.. that means if the file name is 20 bytes it should print the 30 byte name by taking the space as input

sample input :
unix_shellscripting.txt
unix_shellscripting .txt

One really important point: you DO NOT want spaces in UNIX filenames. UNIX is not Windows, spaces in filenames are a problem for inexperienced or experienced shell programmers. Trailing spaces in an actual filename would horrible.

What are you trying to achieve , please tell us, but not how you want to do it.

See my reply in your thread:

1 Like

@jim : its my requirement thats it..:slight_smile: general casestudy as i am new to unix..