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


ADVERTISEMENT

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 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 :: Simulate A Floppy Drive With User Read Write

Sep 17, 2010

I have a computer with no floppy drive (x64 ubuntu lucid installed) I have a program (wine windows xp) that will only save data and export data from/to a floppy drive. I found information on setting up an emulated floppy drive. i.e.

sudo dd bs=512 count=2880 if=/dev/zero of=imagefile.img
sudo mkfs.msdos imagefile.img
sudo mount imagefile.img /media/floppy -o loop

I modified the winecfg to include under the drive section A: /media/floppy. Problem is I cannot write to the drive as a normal user. I have tried everything I know but only root can read write to the drive. Is there someway to set up this emulated floppy to allow me as a user to write and read contents.

View 1 Replies View Related

General :: Keeping Mtab Open To Write Next Commands?

Jun 21, 2010

I'm looking at an rc.sysinit:
# Remove stale backups
rm -f /etc/mtab~ /etc/mtab~~
# Enter root, /proc and (potentially) /proc/bus/usb and devfs into mtab.
mount -f /
mount -f /proc
mount -f /sys >/dev/null 2>&1
mount -f /dev/pts
I can't figure out what those "~"'s are doing. From the comments it's keeping mtab open to write the next (how many?) commands?

View 1 Replies View Related

General :: What Shell Allows Recalling Commands With Certain Beginning

Sep 14, 2011

Programs like matlab/octave and I'm sure many other ones allow you to start typing a command, and then hit Up to recall the last command that starts with the typed characters. Common linux shell bash doesnot do this. Is there a different shell that does? I'm not asking how to find out the last command, I'm asking if there's a shell that's a little friendlier.

View 3 Replies View Related

General :: Copy From 1 Computer To Another With System Shell Commands?

Jun 23, 2011

I want to copy a file (home/remote_computer_user/Desktop/test1.txt) from my remote office computer (a permanent URL + open port) to my home computer (home/home_computer_user/Downloads/).

How can I do this with shell commands in Linux?

My current thoughts:

ssh <user>@<computer1address> -p <port> - gives me a shell on the remote computer
(I think I should use scp, but I dont how exactly how in my case)

What are the exact commands I should use?

View 1 Replies View Related

General :: Shell Commands To Display All Applications Installed

Aug 5, 2010

Ares there any shell commands to display all applications installed in my linux machine,?

View 7 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 :: Shell Script That Logs Into Another Machine And Executes Some Commands?

Jan 5, 2011

I am trying to write a script that connects to a server and executes some commands on there. Something like this:

#!/bin/sh
telnet remote_machine
cd /home/some_directory
cat a_file_in_current_directory

Unfortunately after login/password I guess the script doesn't jump past the telnet command, until I exit. What do I need to do to make the script start executing commands in the remote shell?

View 1 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 :: Prevent The Logging Of Commands Run Into Syslog As Post-shell Expansion?

Dec 15, 2010

Is there an easy way to prevent the logging of commands run into syslog as post-shell expansion?

I.e log a command of "ls *.log" as just that, rather than "ls a.log b.log c.log d.log" It makes rather a mess of the log files.

View 1 Replies View Related

General :: Configure Using Arrow Key To Repeat Previous Shell Commands In Minix?

Jul 20, 2011

I am new to Minix. I'm so impressed by the speed of the system. It looks elegant, I like it. However, I have a question about the shell. In Linux, while using a shell, up and down arrow keys can be used to navigate through previously executed commands. On Minix with the sh shell, I can only get numbers printed out on the screen. I remember I chose a US-std keyboard when installing. Is there any way to use the arrow keys to navigate through previous commands on Minix?

View 1 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 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 :: Process Billions Of Small Files Using Bash Shell Commands With Limited Memory?

May 26, 2010

I need to process billions of small files using bash shell commands with limited memory size (256MB). If any of those files contain certain "keywords", the file will be removed. I tried with command:

find . -type f -exec grep -i -l -H "keyword" '{}' + | xargs rm -rf

where all files are located within the current directory. But the command above failed in "out of memory".

View 1 Replies View Related

Ubuntu :: Booting Into BusyBox Built-in Shell

Jun 30, 2011

As far as I know the power went out once and my computer might have been on - now Ubuntu won't boot correctly. It boots into 'BusyBox v1.15.3 (Ubuntu 1:1.15.3-1ubuntu5) built-in shell (ash)'.

Code:
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have requested /sbin/init.
No init found. Try passing init= bootarg.
BusyBox v1.15.3 (Ubuntu 1:1.15.3-1ubuntu5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)
(initramfs)

View 2 Replies View Related

Server :: Getting BusyBox V1.1.3 Built In Shell On Reboot?

Jul 30, 2010

We rebooted the server and getting:
BusyBox v1.1.3 (Debian 1:1.1.3-5ubuntu7) Built-in shell (ash)
Enter "help" for a list of built-in commands.
(initramfs)
When we boot from the live CD to run fsck manually, it cannot find the hdd partition. It's using Lilo boot loader.

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 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 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 :: System Administration Scripting - Write Very Basic BASH Shell Scripts

Jan 10, 2011

I'd like to know some good resources, links, e-books to learn basic Linux system administration scripting. I know how to write very basic BASH shell scripts so I'm still at beginner level. There are so many docs out there that I'd like to narrow down people's opinion's on the best easy to understand resources that are available. Eventually I'd like to learn basic PERL as well.

View 3 Replies View Related

General :: Write Shell Script That Takes A File Path As Command-line Arguments?

Dec 14, 2010

How can i write a shell script that takes a file path as command-line arguments.and it should report whether the path denotes a file or a directory.

View 2 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 :: 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

Ubuntu :: Program To Write Commands Like Code?

Nov 14, 2010

I'm a noob in Ubuntu. I need the program which will help me to learn different ubuntu commands. I often forget them and after reinstall I don't want to search them in Google. Now I write them in the standard text editor and my code looks like this:

Restore MBR:
Delete GRUB (fixmbr)
Ubuntu terminal then:
sudo apt-get install ms-sys
sudo fdisk -l

[Code]...

View 2 Replies View Related







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