1,817 Topics

Member Avatar for
Member Avatar for herrschteiner

I'm writing a bash script that redirects the output of a command to a file. The next thing the script should do is read the contents of the file, into the tenth line of a python script. It's tricky, because the line of text in the python script should read: …

Member Avatar for Software guy
0
305
Member Avatar for kww228

I am working on a shell script that takes a single command line parameter, a file path (might be relative or absolute). The script should examine that file and print a single line consisting of the phrase: Windows ASCII if the files is an ASCII text file with CR/LF line …

Member Avatar for chriswelborn
0
834
Member Avatar for chubbyy.putto

I very new to C Shell. I am trying to do is read from Command line. Find the if the file is zip, .txt, symbloic link,pipe, unknow (if file is not zip, txt, sy....) here is what I what got so far. I am very stuck atm Please help me …

Member Avatar for chubbyy.putto
0
175
Member Avatar for hwoarang69

How can I use seleium test case in groovy? such as clinking on links. test case <html> ... <body> <table> <tr> <td>open</td> <td>https://url.web:8010/</td> </tr> <tr> <td>clickAndWait</td> <td>link=service=homeLink</td> </tr> <tr> <td>clickAndWait</td> <td>link=name=contentLink,service=Queue</td> </tr> <tr> <td>clickAndWait</td> <td>link=BackLink</td> </tr> ... groovy script // Setup credentials def String[] credentials = new String[2] credentials[0] = …

0
135
Member Avatar for Chem_1

In real time applications where we use shell scripting and how it differ from other scripting languages?

Member Avatar for danielpeterson
0
1K
Member Avatar for Stuugie

Hi All, I'm working on a script which has a primary function to look for jpg files. I can get it to work if the folder path is just my desktop but if I try the start of the path to be C:\ it errors out. Right now the error …

Member Avatar for cgeier
0
411
Member Avatar for evaldaskowka

Hello, i want to try to make a simple program that guesses the password of wifi for education purposes. And writing the guess program is the easy part but here comes the hard. this is the way you connect to wifi with cmd **C:\>netsh wlan connect name=wifiname ** But where …

Member Avatar for cgeier
0
155
Member Avatar for Akshay nand

Write a shell script, guess.sh that implements a simple number guessing game. When run, the shell script prompts the user to guess a random number between 0 and 100. If the user guesses incorrectly, the script prompts the user “Guess higher” or “Guess lower” as appropriate and allows the user …

Member Avatar for cfajohnson
0
138
Member Avatar for spowel4

I am defining the following variables inside a bash script (note: I ultimately want to pass these values to the bash script from the commandline but I haven't gotten that far yet): OFS=',' INPUTFILE='~/data.txt' OUTPUTFILE='~/delimited.txt' FIELDWIDTHS='1 10 4 2 2' Next, inside the bash script I'm attempting to call an …

Member Avatar for cfajohnson
0
555
Member Avatar for cjohnweb

Hello! I am normally in the PHP / Web Development section of DaniWeb. It's a pleasure to finally have a reason to check out other sections of DaniWeb! So, I am logged in as root at the Command Line Interface over SSH - on Debian 7 Wheezy running on a …

Member Avatar for cjohnweb
0
336
Member Avatar for shroomiin

Hi. I have here a script which I had acquired from the net. I have tested it in a lab environment and it seems to accomplish my task perfectly. That being- to list each server in the domain, its services and the account the service runs under. Problem is- I …

Member Avatar for chriswelborn
0
163
Member Avatar for Somnath_1

I am trying to get two input from a file . #!/bin/bash echo "enter clientname" read clientname echo print|nsradmin -s $clientname -p390113|egrep 'NetWorker version|IP address'>> output_$clientname the content of the file would be : $ cat test_new1 NetWorker version: 7.6.3.2.Build.860; IP address: xxx.xxx.xxx.xx; I want to grab "IP address:" to …

Member Avatar for chriswelborn
0
206
Member Avatar for Wei_3

How to make Ctrl-Z work with xterm -e "ping localhost" there will be a child process but how to pass the Ctrl-Z to that process? I tried Ctrl-C and S and Q they are working fine...

Member Avatar for Mocabilly
0
117
Member Avatar for nravhad
Member Avatar for lovebird_huby

Could someone help me with a Shell Script OR a perl script which could read the below INPUT File and print output in format listed below. The logic I am looking for is to read each block within the asterisk line, then search for "until:". If the date of "until:" …

Member Avatar for griswolf
0
182
Member Avatar for zoollu

Hi, I am familiar with shell script but not really have much experience. I am looking into a shell script that would do this I have 2 tables TableA id name interest ---------------------------------------- TableB id name I have to create a shell script which copies all the id,name values from …

Member Avatar for ramu1211
0
864
Member Avatar for kuldeepJS

Hi, I am struglling to send an image in my email. In the program I am using the shell command sendmail in usr/lib/. I had set the content type to html/text. When I am writing the html tag <img src"<someimage>"/> in the body. The mail when sent is not having …

Member Avatar for hericles
0
122
Member Avatar for woodson2

What I would like to do is read each line in the atdinfile: A sample atdinfile would look like this: 651 652 653 654 655 656 657 658 659 660 661 664 665 666 667 668 I would like to grep through each atd job id looking for a match …

0
100
Member Avatar for whizkidash

Team, Can any one assist me with my below script requirements I log into a jump box with my login and password, Here I need to create a script which i will run from this point that will connect to a different server using ssh and it should prompt me …

0
171
Member Avatar for chaitu11

I am transfering files from system directory to server directory which works perfect. But i need to run batch file after every half n hour. I need to make it as a **batch file** please help ftp -i 21.49.567.12 username password cd "uploads" lcd "c:\up" binary mput p* disconnect bye

Member Avatar for daChi
0
78
Member Avatar for toldav

Hi Guys, I'm new to awk and trying to format an stadout "temp.txt" to csv format so I can export to excel. I'm having issues here is my code so far..If any one can help to see the light!!! The ### sign is the second server on the list each …

Member Avatar for thekashyap
0
228
Member Avatar for nsiq

How to validate multiple inputs on a dialog form using shell scripting? Validations must be performed before submitting form or when focus shift to any other input field .

0
115
Member Avatar for westony

I am having this simple script: #!/usr/bin/expect -f set values "#host=CE101 #host=CE102" set found [regexp {[A-Z]{1,2}\d{2,3}} $values CE CE1] if {$found == 1} { puts "px is $CE" puts "vpx is $CE1" } else { puts "\nfailed to match anything from\r\n$values" } puts $found So my problem is that regexp …

0
126
Member Avatar for amavikmukherjee

[Click Here](null)Hello dani. I know how to write to a file using redirection. But I am unable to write a record to every new line. I want it this way alex amsterdam 800 7 But I am ending up putting everything in a new line, I mean the fields or …

Member Avatar for txernobill
0
352
Member Avatar for coding101

Not hot on sed.. I have the string <Report name="05/14/14 05:05:53 AM - Report"> in a file. I need to change the date and time part to the current date and time.. any sed regex to match the date format and timestamp?

Member Avatar for L7Sqr
0
150
Member Avatar for changeworld4u

Hi Team, I have a file which contain following data like BKP0000032183140217000019 053IGZYEVSDOX .........field 2....... field3.....field4..... BKP0000032284140217000019CCTP1220 ............... BKP0000032384140217000019CA ..................... each line has 5 fields Now using shell script i am trying to extract field 4 based on condition that line start with BKP and contain code 84 and CA …

Member Avatar for changeworld4u
0
284
Member Avatar for brakeb

I have been beating my head into the desk with this issue, and I don't think it's a simple 'uniq' or 'sort' issue. I have a file, with many duplicate values in them. File ---------- dog dog cat owl owl turkey weasel giraffe giraffe rooster The output I am looking …

Member Avatar for brakeb
0
193
Member Avatar for changeworld4u

Hi Team, I am new to shell script, i have knowledge of basic unix command but that doesn't seem working for my current task. Please help me with following problem: I have a xml file for e.g. <ShippingInstructions> <name>Sarah Bell</name> <address>400 Oracle Parkway Redwood Shores CA 94065 USA</address> <telephone>650 506 …

Member Avatar for rubberman
0
178
Member Avatar for gregarion

Hello All. I have an issue with string manipulation. The file which I am using has two lines : First String: 1 4 Second String: 5 4 What i am trying to do is while reading each line, i would like to store each variable in the line into 3 …

Member Avatar for rch1231
0
195
Member Avatar for TraderX

Hello all, I am by no means a coder, so hopefully someone has something they would be willing to share that would meet this need. I would like to have a Outlook rule, where: - When an email comes in from a specific account - Has an attachment (PDF, doc, …

0
179

The End.