1,891 Topics
| |
Hi all, I am trying to write a shell script that submit a couple of jobs .Then in the "job.e.." files looks for the "Finished with all tasks." string and if it exits it continues to lets say step 3 submitting job3 and if not to step 4 and submitting … | |
Hi. In my bash script I have a loop which downloads a few files in the background with 'wget'. How can I make my script wait until all downloads are complete before it goes on? I guess I have to use the 'wait' command after the loop in some way? … | |
Hi , I want to write following contents in a file through shell script. below is the content ------------------------------------------------------- DATE: Wed August 01 2:20 PST 2011 PRODUCT: Quick PRODUCT_VERSION:21.0 PROJECT: QW12 BUILD: 21.1.3.10 PATH: r:\\QW\21.1.3.10 -------------------------------------------------------- Where Build is variable . It should fetch the data from system(i.e. current version … | |
Hi, I have situation where i need to automate transferring 10000+ files using sftp. while read line do if [ -d "$line" ]; then echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt fi done< files.txt sftp -b sftpCommand.txt stu@192.168.2.1 The above code executes each sftp command written to sftpCommand.txt. If some error occurs while … | |
Hey guys- I'm trying to create a BASH script that will connect to a remote server, via SSH that requires a password, and then search a log file for the word error, store the output in a file, and then return the file to the local machine. I would like … | |
I have a batch file that uses the NET USE command to install some software. The location of the software requires a user to login. How can I ask the user for their username and password in the batch file and then use it in the NET USE string to … | |
consider a list of files in a particular directory(LIST A) 58623208 Sep 14 20:08 blbn_blfbe_drv 57904920 Sep 14 19:54 blbn_cycmn 55814208 Sep 14 06:02 clsa_Upd 38912000 Sep 14 19:12 cs_chgpp and in another directory (LIST B) 58623208 Sep 14 20:08 blbn_blfbe_drv 57904920 Sep 14 19:54 blbn_cycmn 55814208 Sep 14 06:02 … | |
Say like I have hi() everywhere in a shell script and I would like to replace only a hi() to hi(20) right under the line "#modify only the hi() below this line". Is there anyway that I can locate the line "#modify only the hi() below this line" and then … | |
Hi, I am new to Unix/Linux... I have a TCSH shell script (on AIX4) in which, at a certain point, I want the user to be able to pass commands to the TCSH interpreter. What I do is I create the illusion that the user is at his usuall shell … | |
Hi all, I am creating a Rpm .even i have built it.while i am calling my post install script it not prompting the user to enter the input while i am using the read command to take the input.I have read from google that we can't make the interactive RPM's … | |
Hello, So I'm attempting to do a bulk creation of users into Active Directory (Server 2008) using Powershell. I have a script but every time it runs it throws a exception error. I have tried to go through and find what is wrong, but I am having little luck. Any … | |
Hi all, I want to run a cpp code a couple of times using a shell. Cpp code needs a text file as an input. I have been trying to pass the file to the cpp code no success. The following is what I have done so far: [CODE]#! /bin/bash … | |
I want to search only in my files, contains only .txt and .c [CODE] This doesn't work for me ls | grep .txt | grep .c[/CODE] I want the ls and grep .txt, .c ??Thanks?? | |
I want to create a simple file....with the command Example: [CODE]touch file.txt[/CODE] ok its created *BUT* ****I want to edit this file in shell and save it, writing EOF to finish. Any suggestions? How i do that? Thanks! | |
Is there some sort of script I can write that logs usernames every time someone (other than owner) "cd's into my pub directory"? any ideas? thanks | |
hey all, im new at shell scripting and need to find out a simple way to create text files, with random words in them. then needing to input 3 of these files arranging their lines in alphabetical order and after that creating an output file with the last lines sorted … | |
Alright, here's the deal.There's a folder with Jpg images and I want to open each JPG image in that folder, rotate it clockwise once and save it with the same name in the same folder. How do I do that with batch programming? We Can't use "Windows Picture and Fax … | |
Hi, everybody! I have a big problem. I don't understand Unix, but I work as a system administrator, and sometimes I make some data exports and I have to delete old .dmp files, but today I had a mistake, I wrote rm * 909* This is a part of my … | |
A friend of mine made this script to backup files from all my ubuntu boxes using lftp to an ftp server i setup on my local windows 7 machine using apache and abilityftp server. However it is only backing up some config files(see attached screen), none of the actual directories … | |
Hi, I want to ftp a file to a location and then kickstart a process there to work on the file. I tried using !rexec but it does not seem to be working too well. I am not using the .netrc file(if that helps you understand my problems better) Thanks … | |
Hi, I was wanting to write a (ba)sh script to allow me to wait for the detection of a new USB device, and when that device is detected, execute some commands. The scripts are intending to be working on the principle that whenever I plug in a usb device a … | |
I attempted to make a shell script to launch a java program packaged into a .jar file. It should have been pretty simple. [CODE] #!/bin/sh java -jar Test.jar [/CODE] but for some reason this script never runs. i've manually executed the command and it works perfectly, i've checked the path … | |
Asking for a Linux command line to convert all files in current folder from UTF8 to ANSI, name unchanged. Best Regards Pei | |
I currently have a small script I've written that basically takes an incremental backup of a folder which looks similar to this: [code] #!/bin/bash cp -ruf /home/folder4/subfolder/ /home/folder5/ cp -ruf /home/folder3/subfolder/ /home/folder4/ cp -ruf /home/folder2/subfolder/ /home/folder3/ cp -ruf /home/folder1/subfolder/ /home/folder2/ [/code] Now this runs fine, only updating the files that … | |
I have a perl application.In one of the low level scripts, it's possible that it must "logout" the user.Basically, exit the shell that this application is running. Are there Any ideas on how to accomplish this? | |
What programming language is fit for shell scripting? And could you add a sample code of a shell? | |
Im trying to scp including password in one line... seems not working. [code] echo "pass" | scp --stdin source destination [/code] However this does work though [code]echo "newpass" | passwd --stdin user [/code] same concept, diff result. Any suggestion would be great. Thanks | |
Sometimes it is hard to locate the exact line you want to modify if there are so many lines having the exact same codes/text. example: #this is x a=0 #this is y #this is yy a=0 this is z a=0 My question is, is it possible to find something unique, … | |
I wrote this small script to convert all sh files in a directory and all sub-directories to resolve a compilation error I was getting with cygwin... [CODE] SETLOCAL @echo off :: Locate all sh files in the target directory and then :: Convert CRLF to Unix Style LF echo Converting … | |
Hi, I recently started working using awk. I am facing a problem to traverse a file row by row. I have a file test.txt which has 2 fields filename and action. test.txt -------- /tmp/a.txt|Action1 /tmp/b.txt|Action2 /tmp/c.txt|Action3 I need to check for the existence of file ($1) in the above file, … |
The End.