1,891 Topics

Member Avatar for
Member Avatar for SakuraPink

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 …

Member Avatar for cfajohnson
0
127
Member Avatar for Azurit

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? …

Member Avatar for ennoil
0
2K
Member Avatar for sachin27

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 …

Member Avatar for ennoil
0
172
Member Avatar for noobrobot

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 …

Member Avatar for L7Sqr
0
162
Member Avatar for inthespotlite82

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 …

Member Avatar for masijade
0
752
Member Avatar for MaddTechwf

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 …

0
54
Member Avatar for munitjsr2

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 …

Member Avatar for L7Sqr
0
211
Member Avatar for k2k

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 …

Member Avatar for anijacity
0
166
Member Avatar for etm9413

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 …

Member Avatar for etm9413
0
436
Member Avatar for manish250

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 …

0
85
Member Avatar for Proloe

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 …

0
197
Member Avatar for SakuraPink

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 …

Member Avatar for SakuraPink
0
237
Member Avatar for aFg3

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??

Member Avatar for L7Sqr
0
129
Member Avatar for aFg3

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!

Member Avatar for JeoSaurus
0
64
Member Avatar for coding101

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

Member Avatar for thekashyap
0
152
Member Avatar for anna12

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 …

Member Avatar for eryxzs
1
11K
Member Avatar for D33wakar

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 …

Member Avatar for D33wakar
0
130
Member Avatar for deni_bg

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 …

Member Avatar for L7Sqr
0
160
Member Avatar for Staric

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 …

Member Avatar for JeoSaurus
0
229
Member Avatar for voidyman

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 …

Member Avatar for voidyman
0
101
Member Avatar for Sudo Bash

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 …

Member Avatar for Sudo Bash
0
254
Member Avatar for Digitalwolf

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 …

Member Avatar for Digitalwolf
0
205
Member Avatar for jiapei100

Asking for a Linux command line to convert all files in current folder from UTF8 to ANSI, name unchanged. Best Regards Pei

Member Avatar for griswolf
0
280
Member Avatar for Borzoi

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 …

Member Avatar for JeoSaurus
0
208
Member Avatar for maninaction

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?

Member Avatar for rch1231
0
128
Member Avatar for earlybirdsean

What programming language is fit for shell scripting? And could you add a sample code of a shell?

Member Avatar for cfajohnson
0
195
Member Avatar for k2k

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

Member Avatar for maninaction
0
541
Member Avatar for k2k

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, …

Member Avatar for k2k
0
127
Member Avatar for Satyrn

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 …

0
70
Member Avatar for Member24

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, …

Member Avatar for JeoSaurus
0
243

The End.