Im a natural science graduate student and I'm looking for an easy way to format files before I start a project.
Rather than doing this manually hundreds of times with what I have now, and several hundred times after I begin, I figured a script would be the better approach.
Needless to say, programming isn't my forte.
I came up with this so far, but it only works in a directory. I want this to be able to work in every folder in the directory root I choose. (such as root ls shows folders A B and C, and if the .xyz files are in A B and C, i can run the command from the root and have it work in folders A B and C)
"
"
Line 1: rename .xyz file to .wip
Line 2: delete first 2 lines of .wip
Line 3: add 8 lines from Sourcefile into .wip
Line 4: rename .wip to .dat
I'm currently testing through inputting the codes 1 line at a time since I don't know how to write a script just yet.
Last edited by methyl; 07-14-2012 at 05:10 PM..
Reason: please use code tags
How can I execute the unix command "cd - Change directory" command, so that my command prompt should be reflected for that change.
Example : Now you are in your home directory i.e /home/naresh and you have some sub directory called unixinfo in your home directory. i want to write a script,so... (2 Replies)
I am totally new to unix commands but I need to understand the following command which is a part of a perl script..what does this mean?
myPwd = $(pwd)
myTracker = $myPwd/myTracker.out
exec > $myTracker 2>&1 (1 Reply)
Hi,
I need to do frequently server down and up. Every time i am using nearly 5 to 6 commands to down and agin i am using the commands to up.
Can anybody help me to write a script to down and up.
which i can use once on unix platform it can down later it can up the server. (1 Reply)
Hi,
I would like to write a script with include more than 6 unix commands.
my script like below:
echo " script started"
ls -ld
bdf | grep "rama"
tail -10 log.txt
...
..
...
now, i want to run above unix commands one by one.
example:
first the ls -ld command will be... (3 Replies)
Executing two unix commads via perl script one after another
e.g: make clean
bsub -i -q short make
have tried using exec but the second command doesnt executes (1 Reply)
Hi,
I am trying to implement a server monitoring dashboard using cgi scripting. I am planning to run the necessary unix scripts from the web page using cgi. This method works fine for standard unix commands but I am unable to run some external unix commands (like swadm show_processes, swadm... (9 Replies)
Hi Folks,
I have a text file which may or may not have any data.
I would like to email the file, via a Korn shell script, if the file is not empty.
I am fiddling around with the wc -l command, but no luck so far. The pseudo code is as follows
count=`wc -l test.txt`
if
cat test.txt... (4 Replies)
I wish to create a folder on a unix server B from my windows box using windows batch script.
Below is my windows batch script.
@ ECHO OFF
::Enter your Directory name:
echo Enter your Directory name:
set /p mydir=
plink user1@ServerA
mkdir %mydir%
At plink command i get logged... (7 Replies)
Hi Good morning all,
I want to create script file with multiple commands.
For ex:
pmrep connect is one of the command to connect to repository.
pmrep objectexport is another command to export objects to a file.
These commands should run sequentially.But when i try to execute this, the first... (4 Replies)