≡ Menu

system utilities

Unix / Linux Shell: Parse Text CVS File Separator By Field

I work for a small ISP (Internet Service Provider) and we are using Linux and Unix-like operating system with bash shell. I want to write a shell script to parse the csv file line by line. Then line must be parse again field by field. The sample input file is as follows:


I need to extract each of these example.com,username,groupname,homedir,md5password,permission,secondarygroup fields and passed to the different system utilities. How do I write a shell script to automate this task and use the bash shell to parse a text file?
[click to continue…]

Debian / Ubuntu Linux: Find Out What Package Provides a File

How do I find out what package provides a file called /bin/ls? I use the rpm -qf /bin/ls command under Red Hat Enterprise Linux to find out package name. Can you tell me equivalent command for the same under Debian or Ubuntu Linux?
[click to continue…]

chrt command: Set / Manipulate Real Time Attributes of a Linux Process

Q. How do I set the real time scheduling priority of a process under Linux operating system using a shell prompt?
[click to continue…]