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


ADVERTISEMENT

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

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 :: Shell Script To Search For Files Of Specific Extension And Delete Them All?

Mar 17, 2010

i want such a shell script or single line command to delete all the files with extension specified in script i have bash !! ex... delete all files of extension .obj

View 4 Replies View Related

Programming :: How To Write A Toy Shell

Mar 24, 2011

I'm trying to write a toy linux shell. For starters this is what I'm trying to do:

1. Start a new process with fork.

2. Execute a program in the new process with execl().

3. Redirect the output from the new process from STDOUT to another file descriptor, using dup2(2).

4. In the parent process, read the output from the child process and write it to the screen.

Creating a new process and executing a program in it is no problems, the problem is that I can't seem to capture the output from it in the parent process.

Code:

//digenv
//C++arl 2011-03-24
#include <stdio.h>
#include <sys/types.h>

[code]...

View 14 Replies View Related

Programming :: How To Write Own Shell In Unix

Sep 16, 2010

I wish to create my own shell for my operating systems project in college...

My professor has asked me to make sure that my shell can execute at least 30 or 40 commands... I have around a month's time

I have seen endless source codes in the net, I'm not able to understand any of it

How do i get about doing it?

View 2 Replies View Related

Programming :: Invoking Extension Files In Ubuntu?

Nov 18, 2010

I'm doing a project in Unix version Ubuntu 10.04. I'm doing an standalone app using C++(Qcreator) and GMT(generic mapping tool) so i need help in the following: how to invoke any extension files using C++?

View 1 Replies View Related

Programming :: Write A Function In A Shell Script?

Sep 22, 2010

I need a help regarding writing a function in a shell, what exactly a function does!!

View 3 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

Programming :: Find The Files With Extension .h Or .c With Bash Scripts?

Feb 3, 2011

i want to find all files with .h or .c extension and print them on the screen. How can i do it with bash script programming?

View 5 Replies View Related

Programming :: Write Shell Script To Ssh Into A Remote Computer And Run That?

Jun 26, 2010

How do i write a shell script to ssh into a remote server with password and run a script in it?

View 2 Replies View Related

Programming :: Write A Shell Script To Set Security Policies?

Apr 13, 2011

I don't know how to write a shell script to set security policies for Linux to start. and how. I know that there are many security policies for Linux but do not know which one best suited to write a shell script.

View 5 Replies View Related

Programming :: Write Shell Script So That It Can Run As Service / Daemon

Mar 8, 2010

Am not sure of the best way to go about writing a script. All I need at the moment is to start a java http server program at startup.How should I write languagetool.sh so as to be able to stop the script execution?

View 10 Replies View Related

Fedora :: Create A Shell Script That Adds User And Password In The Passwd And Smbpasswd?

Feb 18, 2010

is it possible to create a shell script that adds user and password in the passwd and smbpasswd?

View 3 Replies View Related

Programming :: Rename Files Recursively, Only Keeping Last X Digits Plus Extension?

Nov 29, 2009

My problem is this:I have a number of directories, all containing files of different name lenghts, including letters, numbers and possibly spaces. I want to recursively rename all of these files, so that only the _last_ 5 digits (not counting the extension) remain. In other words: I want to cut off all but the last 5 digits and not touch the extension.

I've tried to read up on tr, rename (perl version), sed, cut etc. and browsed through some threads here, but so far couldn't quite figure out how to do it.

If someone could point me to the right (standard) CLI tools and syntax.

View 2 Replies View Related

Programming :: Write A Shell Script Which Edits A Config File ?

Mar 1, 2011

Write some simple script?

Heres what Im trying to do:

-Qjackctl has a config file which is modified each time QjackCtl is shut down. This means that whatever preset is in use when QjackCtl closes is written into the QjackCtl config file as the DEFAULT PRESET, for the next time QjackCtl starts (or at least this is how I understand it).

-I want to edit a specific line in the QjackCtl.config file, which specifies the DEFAULT PRESET. Obviously its easy to do manually, but I want to do it using a shell script which runs automatically on StartUp so that QjackCtl starts every time with the same DEFAULT PRESET, NOT the last one used.

-Unfortunately Im not at my Linux system right now (which is KXStudio/Kubuntu), but I believe the QjackCtl.config line looks something like this: DEF_PRESET=alsa (where alsa is the name of the preset)

PRESET1=alsa
PRESET2=firewire

I want a shell script which changes the line DEF_PRESET=alsa to DEF_PRESET=alsa, even when it may currently exist as DEF_PRESET=firewire due to occasions when firewire was the active preset when Qjackctl was last closed. I notice that the application in KDE that enables the user to set which applications open automatically on StartUp also allows the user to select shell scripts.

Ive done some research, as a beginner, and Im led to believe I might need to use AWK and/or CHMOD. I could have a go at writing a shell script but Im always wary about experimenting with StartUp scripts/operations because obviously if I get it wrong and make my system unusable, then because its going to run first thing on each boot, Id have great difficulty disabling it.

View 3 Replies View Related

Programming :: Write A Replacement For Shell Command Line Interpreter?

Sep 2, 2010

If say, I want to read the input given by user at the command prompt and write a code to execute the cmd given then which commands do i use to implement this ( Im writing the code in C )?

View 8 Replies View Related

Programming :: Write A Shell Script Which Will Check A File Name In A Dir And Copy It?

Apr 2, 2010

I am a novice to the shell script. In my system from db server the log files are enerating with the name log1.txt,log2.txt..... It is capable of keeping 10 files at a time in dir called /db/sis/log1.txt. I want to copy the log1.txt to another directory when ever it generating by attaching the time stamp to it for the back-up purpose. this files will be there for a period of 24 hours. after that the back-up dir should be cleared and it start copying again the fresh file from the same dir.

View 3 Replies View Related

Programming :: Find / Write A Shell Script That Will Go Through A File Organized?

Jul 3, 2009

I am trying to find / write a shell script that will go through a file organized like this (but with thousands of lines)...

93,5.00,"contig00002",169,83,"jgi|Brafl1|100379|fgenesh2_pg.scaffold_359000019"
579,1.00,"contig00003",3,380,"jgi|Brafl1|114745|estExt_fgenesh2_pm.C_1200006"
450,5.00,"contig00007",2,352,"jgi|Brafl1|274326|estExt_GenewiseH_1.C_8420008"

...and check the region of each line between the second and third pipes (the 6-digit numbers) against the values in the first column of a separate text file in CSV format like this...

274326,"Wnt family of developmental regulators"
114745,"FOG: Hormone receptors"
100379,"Transcription factor tinman/NKX2-3, contains HOX domain"

...and when they match, replace the value to the right of the third pipe (e.g., fgenesh2_pg.sca...) with the value in the second column in the CSV file associated with that number.

View 4 Replies View Related

Programming :: Write A Shell Script For Submitting Multiple Jobs Sequentially

May 27, 2010

I want to write a shell script for submitting multiple jobs sequentially. For example,

#!/bin/bash
qsub job1.sh

# when job1.sh is done, run the next one

qsub job2.sh

how to make the shell script know that job1.sh is done and now I can run job2.sh?

View 4 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

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

General :: Shell Script That Adds Users Name To A File When The File Is Modified?

Mar 30, 2010

I need a shell script that will add the users name and date to a file when the user has modified the file, these files are within a group and only accessible to this group. But we need a way for people in the group to know who and when the file was last modified.

View 1 Replies View Related

Server :: Samba Adds Execute Flag To All New Files

Jan 19, 2010

We have started using ACLs on our fileserver and we are having a problem with getting Samba to behave correctly. When we create a file in Linux, the permissions and ACLs are set correctly. Files are set to 640 and directories are set to 750. However, when we create it in Windows through Samba, regular files are being set with 650 and directories are set to 770. It's adding execute on files and execute+write to directories for groups.

View 2 Replies View Related

Programming :: Write A Script For Ftp To Get .mp3 Files?

Mar 29, 2009

I want to know how to write a script that would use the standard Linux FTP command to download all the mp3 files from a FTP server cause GET *.mp3 doesn't work. Also how would I write the same script but as a batch file to be run in windows cmd through the windows native FTP command?

View 4 Replies View Related

Programming :: Write A Script That Will Go Through The Files In A Directory?

Nov 19, 2008

How can I write a script that will go through the files in a directory and print on the screen the name of the files stating if it is a file or directory. The directory is already provided by the user.

View 12 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

General :: Cp Adds Exclamation Points When Copying Very Large Text Files?

Jul 13, 2009

For my research I have some very large files that are basically millions of lines of ten columns of numbers. These files can be up to 5 GB in size. Recently I noticed that when I made a copy of one of my files, some exclamation points appeared in it where there should not be any: in front of random numbers throughout the file. Making another copy of the file would result in exclamation points in front of different numbers in different parts of the file. Doing this many times has given me up to four exclamation points in different parts of the file. Sometimes the file copies just fine without producing any extraneous exclamation points.Additionally, I have occasionally seen a "^K" where there should be a newline (the data that should have been on the next line was instead on the previous line with a ^K in front of it) in copies that I have made of my files. I don't know if this is related or not.

View 7 Replies View Related

Programming :: Write A Script (possibly Awk) That Is Able To Process 2 Files?

Oct 7, 2010

I need to write a script (possibly awk) that is able to process 2 files, but I am very new to awk and I have problems in how to process 2 files at the same time.The first input file is samples.txtthe formattime_instant measure

Code:
903.0 -
906.43 18.4

[code]....

View 2 Replies View Related







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