General :: Write A Shell Script Which Will Simultaneously Collect OS User Information And Write In An Individual Text Files?

Feb 17, 2010

I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.Can anyone tell me the syntax of the script.N.B. The user name will be mentioned in an array within the shell script.

View 8 Replies


ADVERTISEMENT

General :: Write A Shell Script That Allows Only User 1 And User 2 To Execute A Program?

Feb 25, 2010

I've looked everywhere but I can't find where to change the default box for incoming mail, or am I on the wrong track. It's a nuisance having to change folders and I can't configure wastebin to empty on exit.And I can't get kmail to import from evolution. Do I have to go to the evolution storage and do it manually, and if so, how do I do that?

View 1 Replies View Related

General :: Write Expdp Output In A Text File Using A Shell Script ?

Feb 7, 2011

I want to write expdp output in a text file using a shell script

If i write like below:

It will write whatever is there in log file to text file

But, sometimes export fails with out start taking export (without generating log file) because of job already exists error. such times, we dont know about that error until we check manually... so i wrote like below:

But still it is not writing anything in to text file using above stmt...

View 1 Replies View Related

General :: Write A Script To Report Useful Information On Disk Utilization For Each User's Home Directory

Feb 27, 2010

I need to write a script to report useful information on disk utilization for each user's home directory.For each directory I need to show: 1. the long listing of that directory entry (but not the files in the directory), so that I can see the rights and owners of the directory.2. The amount of disk used by that directory, in human-readable format, including subdirectories. I need to have two lines for each user one after the other. For example:

/home/user1 directory info
/home/user1 disk usage
/home/user2 directory info
/home/user2 disk usage

The script will assume that all users, except user root, have their home directories in the /home directory (no need to do anything with the /etc/passwd file). And if the administrator adds or removes users, the script should still work correctly (so the script shows the information for all current users).

Here's what I do know. The command "ls -ld /home/user's_name" will give me the info I need for #1. And the command "du -hs" will give me the info I need for #2. What I don't know is how to grab each individual directory in order to apply the above commands to each of them in order. ???

View 14 Replies View Related

General :: Write Shell Script That Give A Number Between 1-3444 From User

Feb 18, 2011

i want to write shell script that give a number between 1-3444 from user and if user enter out of range number give error e.g number must between

read -p "plz Enter Number " p
while [ $p != [1-9] -o $p != [1-9][0-9] -o $p != [1-3][0-4][0-4][0-4] ]
do
read -p "plz Enter Valid Number" p
done

but this have an error in while statement ! two many argument

View 3 Replies View Related

General :: Write A Shell Script Which Will Read The Directory Path As Input From User?

Nov 28, 2010

I am new to writing shell scripts. So, please bare with me. I am currently trying to write a shell script which will read the directory path as input from user and will traverse the Dir tree to find all available audio and video files. I have tried to write as much as I could but I don't know where I am making mistake as I get some files to be audio file which are actully tar balls. On the second note there are some files which video but script shows them to be audio. And, some video files are completely skipped. I am giving the shell script below so that you can see. I am using two external files as source which I am attaching.

Code:

#!/bin/bash
#Let's load the extensions that we want to search for
vdExt=$(cat vdExtList)
adExt=$(cat adExtList)

[code]....

View 5 Replies View Related

General :: Write A Shell Script That Will Delete All The .dat Files?

Apr 21, 2011

i have to write a shell script that will delete all the .dat files in /var/oracle/etl/incoming which the created date of the file is 7 days before the currrent date.

View 8 Replies View Related

General :: Write Shell Script Which Can Take Number Of Files And Count Total Rows From All CSVs?

Oct 8, 2010

I need to write shell script which can take number of files and count total rows from all CSVs and display total number of rows counted in all files. Is there any possibility of doing that using shell script and if yes then how.

View 4 Replies View Related

General :: Always Create Files/folders But Only Write To Those The User Owns?

Aug 14, 2011

I need 2 Linux users to share a folder. Within this folder, users should always be able to create files and sub-folders and write into any sub-folder (whether they own it or not). However, they should only be able to edit the files they actually own.

View 1 Replies View Related

General :: Write A Shell Script Which Can Ready Content Of The Folder And Place Files On Remote FTP Server?

May 9, 2011

I need to write a shell script which can ready content of the folder and place files on remote FTP server. I need to make sure that a file that is already placed on remote FTP server is not attempted second time. The file names will be something like Records-2011-05-09. The files will be generated by MySQL every hour.

View 7 Replies View Related

Programming :: Write A Small Perl Script To Collect Some Info From Mysql?

Oct 10, 2010

am running Centos 5.4 and would like to write a small perl script to collect some info from mysql.

so I went
yum install perl-DBI
yum install perl-DBD-mysql

then

nano perl.pl
---
#!/bin/perl
use Mysql;

[Code].....

Why can't perl find Mysql.pm? I guess because it doesn't exist as I ran find / -name Mysql.pm, and also could not find it.

shouldn't that file have been created and thus exist after I install perl-DBD-mysql?

View 6 Replies View Related

Programming :: Write Shell Script For Copy Files?

Mar 25, 2010

write shell script for copy files to usbdąsk that cosist of very long argument like "2009025_efkl".

View 1 Replies View Related

Fedora :: Write A Program Which Would Get Information From A Webpage And Display The Information On Desktop Sort Of Like A Widget?

Sep 3, 2009

I'm trying to write a program which would get information from a webpage and display the information on my desktop sort of like a widget. I kind of remember there being something like this already made, but for the life of me I can't remember what it's calledDoes anyone know?

View 1 Replies View Related

General :: Write A Script To Extract Information From Db Tables?

May 25, 2010

I want to write a script that will extract information from a db table and store that information to a csv file. Basically, I have imported data into a table, I want to save this data to a csv file for later processing. How do I connect to the db and extraxt information from the table?

View 3 Replies View Related

Programming :: Sed Regular Expression - Write Script To Edit Text Files?

Jun 29, 2010

I am trying to write a script to edit text files formatted like this:

Code:
(MCAL@Contig766:0.30207,CGIG@CVIR_Contig1014:0.13977,(HASI@HDIS_Contig573:0.16828,(CAPI@LCIN_5594371:0.36581,CFOR@FQH745302RIQ7Y:1.91244)0.160:0.00019)0.939:0.15648);
There are never line breaks or spaces in the actual files.

I want to delete all instances of the character "@" and everything between it and the next "," (including that comma) or the next ")" (including that close parentheses) whichever comes first. My desired output file would be like this:

Code:
(MCAL,CGIG,(HASI,(CAPI,CFOR)0.160:0.00019)0.939:0.15648);
I figured out how to do this using sed for either "," or ")" but both looking for whichever comes first.

View 6 Replies View Related

General :: Write A Shell Script Instead Of Shell Function?

Apr 27, 2011

I would like know when it is necessary or advisable to write a shell script instead of shell function ?

View 3 Replies View Related

Ubuntu :: Write A Shell Script To Extract Files From An SD Memory Card In The Background?

Aug 20, 2010

I'm looking for a way to insert an SD memory card into my computer and have it copy the files from it (a specific directory) in the background while I view the images from the desktop.

View 2 Replies View Related

OpenSUSE Hardware :: Cannot Write Files To The Disk As A User

Aug 24, 2011

As a testcase on how encryption works out of the box with OS11.4 I've formatted an external drive with encryption. All goes well and upon boot the passphrase is requested. However I cannot write files to the disk as a user and I can't find the correct mount command in order to get it mounted so that my users can write to it and not only the root.

View 3 Replies View Related

Server :: SSH Chroot'ed User Can't Write Files / Solve It?

May 31, 2011

I am having an issue with a Chrooted SFTP User not being able to write files.

The permissions are setup correctly as if I remove the Chroot the user can write files correctly.

User has a transfer folder which they should be able to write files to and read from, this works correctly until I apply the snippet from sshd_config file below then the user can only read files. I have tried tweaking the permissions but this doesn't seem to have helped at all.code...

View 2 Replies View Related

General :: How To Write Own Shell

May 26, 2011

how to write own shell in linux?i want to know procedure of shell programming.

View 5 Replies View Related

General :: How To Write Korn Shell

Oct 14, 2010

I am new and start learning how to write korn shell, can you someone please translate the below command to common English? code...

View 1 Replies View Related

General :: Write A Shell Script?

Dec 11, 2010

write a shell script that allows only user 1 and user 2 to execute a program and only from terminal 01 and terminal 02

View 4 Replies View Related

General :: Write A Shell Script Contains Python One?

Oct 22, 2010

I want to write a shell script contains python one. So,the result of python one is flv file. I want the path of this is copied into a enviroment variable that i have to pass as a flag argument of another program (to convert into mp3). To individuate the result of python script I thought to use (in PWD)

Code:
ls | grep -E '^.*mp3$'
But my question is: How can I copy this result into enviroment variable?

View 4 Replies View Related

General :: Write Either PYTHON Or Bash Shell Scripting?

Jun 4, 2010

I do not know how to write either PYTHON or Bash Shell Scripting. I am to learn one for Linux Administration purpose. Which one will you recommend for a Linux Admin/Eng environment?

View 4 Replies View Related

General :: Write A Shell Script To Simulate The Built-in Commands?

Nov 7, 2010

i was trying to figure out a way to write my own linux commands.. in fact i wanted to write a shell script to simulate an already existed linux commands like 'cd','ls' and'adduser'i just dont know the language of scriptting and even doesnt know the steps to make a script

View 3 Replies View Related

General :: Write A Bash Script To Parse A Text File?

Apr 27, 2011

I want to write a bash script to parse a text file with the following lines and set variables for each line so that I can use them in the rest of the script.

Timestamp=123456789
Company=ABC Company
Server=Server
Recipient=Joe Smith
Email=joe@abc.com

simplest way to read each line one at a time for everything before the =, set that to a variable name with the value equal to everything after the =

View 14 Replies View Related

Programming :: Write Shell Script That Adds An Extension ".new" To All The Files In A Direct?

May 28, 2010

How to Write a small shell script that adds an extension ".new" to all the files in a directory.

View 2 Replies View Related

General :: Write Shell Script For Zabbix Application Level Clustering

Aug 16, 2010

We have zabbix Network monitoring tool installed on two servers 172.17.11.6 ( Master ) and 172.17.11.3 ( Slave ) RHEL 5.4 Servers with 172.17.11.4 being Virtual Ipaddress.We are trying to implement High Availability with Red Hat Cluster Suite.OS level Clustering has been implemented with following cluster configuraiton.

But we need to implement Application level clustering for Zabbix_server process which inturn depends on httpd and mysqld deamons to be running.So I have to check the health of mysqld and httpd with a shell script along with the health of zabbix_server process.Any good tutorials for this ? Any guidlines that I have to follow ?Here I may need to take care of following things when any one of the process goes down

1. Shifhting Virtual IP
2. Shifting /dev/sdb1 ( Shared drive to slave )
3. stopping other services on master
4. starting all the services on slave

View 4 Replies View Related

General :: Write Shell Script To Check The Modified Date Of A File ?

Jun 17, 2011

I have two linux servers, they are backup together.

1. Server 1 have 3 files with name: file1, file2, file3 in the path: /etc/sysconfig/network-script/.

2. Server 2 have 3 files with name and path are the same as server 1.

- How to make a script to copy 3 files at server1 to overwrite on server2. But before overwrite, this script will check and compare the last modified date of these 3 files(on server1 and server2). if the modified date of file1, file2 or file3 on server1 is newer than 3 files on server2 then overwrite process will do, if not, will do nothing.

- see my script as below: it works find now but just overwrite. not check last modified date.

View 1 Replies View Related

General :: Write A C Code To Ping IP Addresses Which Are Read From A Text File?

Aug 3, 2010

i need to write a c code to ping IP addresses which are read from a text file and need to log the response time in another text file.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved