Example: To load username from /etc/passwd into a database table.
awk -F: '{print $1}' /etc/passwd > passwd_txt
cat passwd_txt | while read username; do echo "insert into {TABLE} (USERNAME,GROUPNAME,PRIORITY) values (""'$username'"", 'acct', 0);" >> users.sql; done;
Subscribe to:
Post Comments (Atom)
Wordpress - Local installation in Vmware
If you're interested in exploring website design with WordPress, this guide will help you set up a WordPress instance on your local mach...
-
To print single column from a text file #awk -F: '{print $1}' /etc/passwd To print multiple columns from a text file # awk -F: '...
-
Your new IT project requires you to setup postgresql database and most of the time we get to the postgresql website and download the version...
-
Example: To load username from /etc/passwd into a database table. awk -F: '{print $1}' /etc/passwd > passwd_txt cat passwd_txt | ...
No comments:
Post a Comment