1,892 Topics

Member Avatar for
Member Avatar for vikarna

I have a text file for ex: ABCD#sh run aaaaaaaaa bbbbbbbbb ccccccccc ABCD#sh int dddddddd eeeeeeee ABCD#sh xvy and so on.... I want to parse the lines between ABCD# and the next ABCD#. And send this parse output to CSV file or excel like aaaaaaaa dddddddd bbbbbbbb eeeeeeee cccccccc Please …

Member Avatar for Watael
0
117
Member Avatar for Akira01

OK so I am basically brand new to shell scripts and new to Unix in general. I have a server that has two profiles, one is a shared account for a few friends and I and the other is one that I use to run video game servers off of. …

0
104
Member Avatar for akileshb

How to pass password using scp in commandline SCP <filename> <user>@<Toserveraddress>:<path> Here i want to use password also , how can i use ????

Member Avatar for Taywin
0
360
Member Avatar for lena1990

needed help how can i connect to my oracle database using shell script and how can i assign particular value in table to a variable defined in shellscript and i use sqlplus but i get error

Member Avatar for Watael
0
447
Member Avatar for lena1990

hi i want to display only elements of array tht start with a number can i do that using egrep"

Member Avatar for pritaeas
0
70
Member Avatar for it@61@sec

I have a bash script (test.sh) which reads parameters from the command line. The parameters could look like this: param1 param2 param3&ext param4 param5 The problem is that when the script reads the parameters and then echo them I get the following: param1 param2 param3 No command 'ext' found did …

Member Avatar for it@61@sec
0
970
Member Avatar for niksirat

Hi every one, I have a question. I have many files with this format: a...a-Cb...b-d...d a...a-b...b-Cd...d a...a-b...b-Cd...d-e...e so that : 1- a...a is a number with **m** digits, 2- b...b is a number with **n** digits, 3- d...d is a number with **p** digits, 4- e...e is a number with …

Member Avatar for rubberman
0
189
Member Avatar for jpreem

So Im using our university servers through an ssh connection. I have a bunch of files in a directory which I would like to run through a perl script. So I thought this simple script I concocted should do the trick. I have used similar script on my home computer …

Member Avatar for jpreem
0
333
Member Avatar for ms061210

Hi. I want to create my date format but i dont know how. I want the user to input the date in format DD-MON-YY or else it will give him an error. How can I do that? any algorithm? ANy help would be appreciated. Thanks!

Member Avatar for Watael
0
91
Member Avatar for vikarna

echo "show run" the above commands gives input to terminal of router and then displays output on terminal. i want the output of this specific command to be redirected to the file. please help me

Member Avatar for Watael
0
139
Member Avatar for stharmon

Hi All, I am sed and awk illiterate and needed some assistance. I would like to write a script that will have sed replace all spaces with \space. For example. Program Files would be... Program\ Files I can figure out how to replace the space with a backslash, however, when …

Member Avatar for wickedjargon
0
233
Member Avatar for ms061210

Hi, I am creating my project and I really need some help from you guys. I am creating a form, which will be save in a file. MY question is, is it possible to view the first question then the user should answer it first before the next question popped …

0
81
Member Avatar for biscayne

I have a flat file (template) where I want to replace variables based upon value in another file (csv). Variables in them template are named %VAR_Xz% The values are in the csv file and X is field 0 of each line and y field 1 and up. Example: Badidas, 13.00, …

0
111
Member Avatar for lena1990

hi guys i want to create that read from a text file to print the content of the file but i has the following error /te.txt: No such file or directory you should know that i install ubunto on vmware and the te.txt file i put it in the home …

Member Avatar for Watael
0
98
Member Avatar for k2k

I udnerstand that setting up a public/private key authentication is a way to go when automating scp copy files to target machines. however, I just now just to get a quick a dirty way to copy a number of files to a number of remote machines. My question is how …

0
71
Member Avatar for rev_ollie

Hi, I'm trying to write a "quick" powershell script to end processes passed as arguments: $args $check = Get-process $args foreach ($arg in $args) { if ($check -eq $null) { Write-host $arg " - Its not running" } else { Write-host $arg " - It's running" } } I'm trying …

0
66
Member Avatar for hanvyj

Hi, I'm trying to get a bunch of files off an ftp server. I connect fine: batch script: ftp -v -s:"C:\Documents and Settings\xxxx\Desktop\download.txt" xx.xx.xx.xx and download.txt: xxxx xxxx lcd "D:\Data\FileDump" cd "backup" mget *.* It runs fine until it gets to the mget *.* and then it just outputs all …

Member Avatar for hanvyj
0
140
Member Avatar for dharmendra1986

I have a .sh script which is as follows. #/bin/bash ssh uname@111.XXX.111.XXX | mysqldump -u uname -p test_db>/home/dm/Downloads/test.sql # script ended I want to extract the script from the server "111.XXX.111.XXX" and keep it in a server directory but I do not want to log in to the server. So, …

0
164
Member Avatar for amnakhan786

hi, i am trying to parse a collection of text files that look like following. there a number of them but not all are structured exactly the same way.if i figure to parse this file i can handle the rest.i am novice in bash, and i want to parse the …

0
98
Member Avatar for dharmendra1986

I have a shell script like as follows #!/bin/bash # Downloading Dumps from the production server. Date=`date +'%d-%m-%y-%H-%M'` BACKDIR=/home/tmp/Backup #IP Address of the Server Host="localhost" #User Name USER="root" #Database Name DBS="test_db" echo "Backing up MySQL databases..." echo "Time: `date`" mysqldump -h $HOST -v --user=$USER --password=$PASS $DBS test_tbl1 test_tble2 ...... > …

0
130
Member Avatar for woodson2

Below is a simple script to prompt for user input while suggesting an editable default value at the prompt: shortname=user1 read -e -i $shortname -p "Please enter the username you would like to add: " input USERNAME="${input:-$shortname}" Please enter the username you would like to add: user1 The above is …

0
53
Member Avatar for riahc3

Hello I want to make a simple bat file in Windows 7 but the command (route) only works in admin mode so I would have to ask for admin premissions. How do I do this in a bat file? Thank you

Member Avatar for riahc3
0
112
Member Avatar for lena1990

i want to create a shell script that divide a text file to parts and take the information from each part and store it

Member Avatar for Watael
0
99
Member Avatar for observ

I have an batch script that needs to concatenate several hundred of lines (72 chars) in one long line for base64 to decode. He used line reading because of the windows XP line limit (8191 chars per line). The script currently has 2 issues at result: It exports with 2xquote …

0
177
Member Avatar for Ashley1966

This script is supposed to ssh to the server, which it does and then it supposed to say "case is correct" on the name of the server that the person entered if the case is correct (upper or lowercase). However, it works except that it never returns a servername. I …

Member Avatar for Watael
0
114
Member Avatar for ivan.lilo.rybansky

Hi, i have to write/as homework/ a script that shows list of all users ,users belong to group (which is main group for every user has been showed) defined as parameter of script. In the case of -c, show count of those users. TIP: /etc/passwd, /etc/group

Member Avatar for Watael
0
235
Member Avatar for stupendousomega

I understand that variables are global unless otherwise stated local, but for some reason, (and it's probably my own stupidity) it's not working. I have searched around to no avail. #!/bin/bash function a { echo $1 } echo $1 a Say you pass the word car to it. It should …

Member Avatar for Watael
0
142
Member Avatar for kgal

I'm trying to write a program that will ask the user to input the number of values he wants, prompt him for the values and then print out the maximum value and the minimum value. This is what I have so far: count=1 echo "Enter number of integers" read n …

Member Avatar for 1234brut
0
707
Member Avatar for shreya19

Which command is used to copy all files having the string chap and any two characters after that to the progs directory?

Member Avatar for Watael
0
103
Member Avatar for harpoon35

Hello, I was trying to combine some commands but having a little trouble. In a single command I want to call the script dvdcoll2 and accept input from dvdcoll1. Then I want to put stdout into dvdcoll3, and stderr into dvderror. How do I string together four commands in a …

Member Avatar for Watael
0
105
Member Avatar for kandarpa

Hi there, I want to check whether a file is a link or not. Eg: I have a directory structure as follows: mkdir -p abc/bcd/cde/def touch abc/bcd/cde/def/file cd abc/ ln -s bcd link Now, abc/link/cde/def/file is actually not a file. Its a link Now I want to remove this file …

Member Avatar for Watael
0
210
Member Avatar for overwraith

I am working on a "for loop that finds all the drives on a system that match a given criteria and am trying to accumulate the drive letters into a list(string) which I can then pipe to a command which will do something to those drives. I do not use …

Member Avatar for overwraith
0
227
Member Avatar for samsons17

Hi there, I have the xml file (HSBB_voice_20120925_0000000182.cdr.bc_lerr.xml) that contains data between tags that i want to extract. The sample data from the xml file that i have etracted is like below : ----------------------------------------------------------------------------------- <record record_no = "62" error_code="100">D20|000000063|56604960 071411E2 BC9D24B6 FDB63DEA|6088342010|0166662635|DEFAULT|1348579536|1348579538|3|0|IDD|Flat Rate <record record_no = "63" error_code="100">D20|000000064|7A257C4E 071411E2 BC9D24B6 …

Member Avatar for Watael
0
189
Member Avatar for vishankparikh

Q-1 Write a shell script in Unix that lists files from your current working directory · By modification time when called with lm · By access time when called with la. By default, the script should show the listing of all the files in the current directory. Q-2 Write a …

Member Avatar for sbesch
0
149
Member Avatar for umesh314

Hi, I am trying to write a code in which i want to read the command line arguement ( which i can get by using $(0,1,...) ) and want to give the arguement to some filename. Eg. ./myprogram filename.cpp I want to remove ".cpp" from the filename and want to …

Member Avatar for Watael
0
204
Member Avatar for daino

What language are CMAKE Makefile (CmakeLists) written in? As for other Makefiles are they written in the same language. For example a Makefile.gcc to be compiled using a MingW compiler?

Member Avatar for L7Sqr
0
92
Member Avatar for Borzoi

I am trying to write a shell script but I only want it to run if there are no files with a specific name found on the server. I know how to check for a specif file which would be done like this: if [ -f /path/to/file ] then echo …

Member Avatar for Watael
0
279
Member Avatar for Upendra76

I am triying to write a shell script which do the following steps: 1)Check the status of File (ie:Rejected,Processed and Processed_with_errors) from Database(i am using TOAD tool). 2)If the file is rejected ,then the script should immediatly send a MAIL ALERT to me. 3)If the file is processed_with_errors with mare …

Member Avatar for L7Sqr
0
334
Member Avatar for axn

I.*I need to validate if characters a-z are entered it will reprompt*. Below is a snippet of my script wh While [true] do mainMenu # menu function read $opt # read option from menu if [ $opt -eq 0 ]; then exit elif [ $opt -gt 4 -o $choice -lt …

Member Avatar for Watael
0
204
Member Avatar for vinay7868
Member Avatar for Watael
0
95
Member Avatar for doa.sdude

<ns:Address> <ns:StreetNumber>XXXXX</ns:StreetNumber> <ns:CityName>XXXXXX</ns:CityName> <ns:StateProvNamePA</ns:StateProvName> <ns:ZIP>XXXX</ns:ZIP> <ns:AddressID> <ns:ID SystemCode="CODE">10</ns:ID> </ns:AddressID> </ns:Address> <ns:Address> <ns:StreetNumber>XXXXX</ns:StreetNumber> <ns:CityName>XXXXXX</ns:CityName> <ns:StateProvNamePA</ns:StateProvName> <ns:ZIP>XXXX</ns:ZIP> <ns:AddressID> <ns:ID SystemCode="CODE">10</ns:ID> </ns:AddressID> </ns:Address> <ns:Address> <ns:StreetNumber>XXXXX</ns:StreetNumber> <ns:CityName>XXXXXX</ns:CityName> <ns:StateProvNamePA</ns:StateProvName> <ns:ZIP>XXXX</ns:ZIP> <ns:AddressID> <ns:ID SystemCode="CODE">10</ns:ID> </ns:AddressID> </ns:Address> <ns:Address> <ns:StreetNumber>XXXXX</ns:StreetNumber> <ns:CityName>XXXXXX</ns:CityName> <ns:StateProvNamePA</ns:StateProvName> <ns:ZIP>XXXX</ns:ZIP> <ns:AddressID> <ns:ID SystemCode="CODE">10</ns:ID> </ns:AddressID> </ns:Address> I am tryting to Spilt a File into number of …

Member Avatar for L7Sqr
0
254
Member Avatar for aworodion
0
45
Member Avatar for saamsonn

#!/bin/csh echo -n "Enter a value> " set a = $< echo -n "Enter another value> " set b = $< echo "Doing mathematics> " @ r = $a + $b echo the sum a + b is $r tried runing this script and I keep getting this error report …

0
137
Member Avatar for america9

Hi, I am trying to develop a windows batch file /vbscript, where the script automatically opens an .exe (like for ex: notepad.exe) and selects the file menu and scroll to a particular file menu subitem . This is the code i have so far : Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run …

0
59
Member Avatar for jason.lopeman

Good morning. I'm not sure if this is the correct forum to post this question, and if its not, please direct me. I have a script that lists the last logons for all users on all domain controllers in my domain. I've been asked to modify the script to exclude …

Member Avatar for BitBlt
0
239
Member Avatar for Jbvo

I am tring to call the same subroutine several times. The first time it runs it works correctly. Everytime after the first time it doesn't run the subroutine in order. I was wondering if anyone knows how to do this. Here is my current script. @echo off set description=Disabled %date:~4,2%-%date:~7,2%-%date:~10,4% …

Member Avatar for Jbvo
0
172
Member Avatar for dekker13

I've completed an assignment which takes a file with records, sorts them, and creates a table with the utility 'latex'. The interesting part is that my scripts runs perfectly on my Mac (Darwin) but it runs slowly with no response (or doesn't work depending on how you look at it) …

0
127
Member Avatar for akileshb
Member Avatar for code_r

Hi I'm writing a shell script and I'm trying to get a starting number and an ending number from the user. So if the users starting number is 3 and the ending number is 4, my program should print out 4 5 6 7 as the consecutive numbers. My problem …

Member Avatar for Watael
0
154
Member Avatar for Pooja#

Can anyone explain me the below and please tell me why it is not accepting large number of strings. sed ':a;s/(([^,|]+)[|,].*)\2/\1/;ta;y/,/|/;s/||/|/g' file_nm

Member Avatar for Pooja#
0
287

The End.