1,891 Topics

Member Avatar for
Member Avatar for musicalsailor

Can anyone give me an example of a DOS BAT file (script) that could FTP a file (variable)? I've got the Linux problem solved, but I need to do it in a DOS environment. Thanks, John

Member Avatar for Hawkeye Python
0
141
Member Avatar for vukman

hello everybody. i am attempting to use a script which returns the error: bash: ./script.sh: /bin/bsh^M: bad interpreter: No such file or directory upon "chmod"ing and executing. the code is: [CODE]#!/bin/bsh grep 'Time : ' rob_onholiday298.gout | awk '{print $4}' > temp1 grep 'Total energy ' rob_onholiday298.gout | awk '{print …

Member Avatar for griswolf
0
81
Member Avatar for vishnu.prasad

Hi every one, I am currently working on a server program which executes a series of system commands on receiving a messgae from the client(in C). what the server essentially does is he cd's into a particular directory and executes a shell script that calls make utility and does some …

Member Avatar for vishnu.prasad
0
173
Member Avatar for ramukumar

Hi Friends I have two server 1. server 1 2. server 2 I want to execute a shell script in server 2 from server 1. shell script will returns few data i need to check in server 1 Please help me in this

Member Avatar for rch1231
0
161
Member Avatar for toronto

Hello Guys, I am new to Shell Scrpting but I am learning quickly. My script looks as follows: #!/bin/sh su - postgres echo "Please enter the password for a2billing user and confirm it: " createuser -W -S -d -r -e a2billinguser createdb -e -O a2billinguser a2billing exit 0 With above, …

Member Avatar for masijade
0
989
Member Avatar for musicalsailor

I'm running on a Linux machine and can't get FTP uploads working. Here's my script: HOST='ftp.name.com' USER='username' PASSWD='mypwd' FILE='f1020811' DIR='/data_dir/send' echo ************************************************************** echo * Attempting FTP * echo ************************************************************** ftp -n -u -d ftp.name.com <<END_SCRIPT quote USER $USER quote PASS $PASSWD put f1020811 END_SCRIPT I noticed using $HOST was rejected. …

Member Avatar for musicalsailor
0
95
Member Avatar for abcdabid

Hi all Please help me in this problem: Suppose i have hundreds of files in one directory with different extenshions, I want to rename all filenames. [COLOR="Green"]filename[/COLOR] required filename [COLOR="Green"]XYZ[/COLOR]bla.java with [COLOR="Red"]ABC[/COLOR]bla.java [COLOR="Green"]Xyz[/COLOR]bla.java with [COLOR="Red"]Abc[/COLOR]bla.java [COLOR="Green"]xyz[/COLOR]bla.htm with [COLOR="Red"]abc[/COLOR]bla.htm please tell me about shell script for this. regards Abid

Member Avatar for rch1231
0
102
Member Avatar for notyabhi

I am using ext4 filesytem on fedora 13 and also Windows 7. Tried linux internal reader, ext2fsd and many more to fetch data from ext4 partition but unable to do so. Can any one help to access data in Linux partition from Windows 7. Thank You

0
130
Member Avatar for floris

Hi there, I have a script in my intranet to which I have 100% rights to run through browser using exec(); passthru(); system(); etc with php. Now we use this to make automated backups per user database of certain systems connected. Very simple for the end-user after done working and …

Member Avatar for TheOgre
0
249
Member Avatar for MONITORING

Please let em know if this is valid....... I am trying to run mysql from my shell script by passign a parameter.the sql(script.sql) is in directory $mydir and the parameter is $date and trying to run it this way: un="username" pd="PASSWORD " dbname="dbname" result = `mysql($un,$pd,$dbname,$mydir,"script.sql",$date)` I am trying to …

Member Avatar for reibi
0
146
Member Avatar for breatheasier

Hi, I want to create a program that will synchronise a folder on my laptop(running OS X) and a folder on a remote server(running Linux). For example, the program is contained in a subfolder on my laptop, when I run it, it ssh's to the remote folder and loops through …

Member Avatar for cfajohnson
0
83
Member Avatar for keeda

Need help with following date conversion: I have my dates as 08/02/2010 and I want to convert into 8/2/2010, incase date is 18/12/2010 I want to be same way. Please guide me.

Member Avatar for cfajohnson
0
75
Member Avatar for becon

Dear all I would like to read the input from user #!/bin/csh echo "Please enter a number:" set cutoff = $< # C shell input from stdin cluster_struc validate_rmsd.disp $cutoff 4 | cat > file1.out cluster_struc validate_rmsd.disp $cutoff 4 | wc > file2.out then read the number of line of …

0
58
Member Avatar for keeda

Hi, I have written a script that sends daily emails. I want a certain part of the mail text to be in bold. Please advice me on how to achieve this? Thanks.

Member Avatar for keeda
0
2K
Member Avatar for niall_heavey

Hi all, I literally only started looking at shell a couple of hours ago. I am looking to do just one task, which I think should be quite straight forward. I will try explain it as best I can......... Basically I am trying to automate the grep command from ubuntu …

Member Avatar for niall_heavey
0
116
Member Avatar for arsenal_fan

Hi, I was recently asked in an interview the number of processes that are created when I enter in a command that contains a pipe. For eg. If I enter the command: $who | tee /dev/tty | wc -l Could anyone tell me how many(which) processes are created and in …

Member Avatar for griswolf
0
116
Member Avatar for thehivetyrant

Hi there, I'm making a simple shell program in [B]pico using Unix[/B]. I was given most the code from a tutor and added bits to it, it's supposed to go to a prompt allowing user to type but instead it does nothing. [B]No errors are shown.[/B] Btw: i use [B]gcc …

Member Avatar for thehivetyrant
0
132
Member Avatar for andrewschools

Hello there - I have three directories. I would like to compare directory1 with directory2, then take those changes/new files and copy them over to directory3. I was given the following code: [code] #!/bin/bash dir2="d1" dir1="d2" dir3="d3" for file in dir2/*; do file_in_dir1=dir1/$(basename ${file}) if [ ! -e ${file_in_dir1} ]; …

Member Avatar for rch1231
0
382
Member Avatar for masifahmed

Hi Experts, I'm newbie in Shell Srcipt Programming. I want to copy some binary files to remote server through ftp script. I got a script which is working fine like coping files to remote server. But I want to put some conditions in script like if the file already exists …

Member Avatar for griswolf
0
125
Member Avatar for spowel4

If I have the following line in a bash script, it works fine: [CODE]CoDescDate=$(awk -F"\t" '{print $22}' $1)[/CODE] If I embed the above line in a function that is within the same bash script, the script seems to hang at the point of invoking the function. [CODE]pay_ending_date () { CoDescDate=$(awk …

Member Avatar for spowel4
0
148
Member Avatar for spowel4
Member Avatar for Viruthagiri

Hello friends, I have text file which contains more than million phone numbers. Here is the example. I want to extract all numbers and put it in a excel single row file. [QUOTE]07748362656 07532517142 07946132831 07532135934 07880531707 07816820456 07879181057 07928483273 07735721101 07668889152 07925787076 07041438421 07524774407 07948383594 07927231600 07796044906 01679953124 01615331860 …

Member Avatar for cfajohnson
0
142
Member Avatar for sdert

We try to search and remove duplicate files and need the best program for this purpose.

Member Avatar for rodriguez19
0
80
Member Avatar for titotoms

Hi, What is a log file?What is its purpose?How do I open, read and write to log files? Thanks, Toms

Member Avatar for Lalchand Saini
0
121
Member Avatar for habib_parisa

I am using Ubuntu-gcc and have a large C code which uses routines from numerical recipes and GNU scientific library. It needs a compilation compilation because each library, i.e. nr and GNUsl, needs its own flags for gcc. Therefore I use a makefile. It works well when the code is …

Member Avatar for griswolf
0
365
Member Avatar for theuman

Hey Everyone, Shell programming is something I haven't learnt or tried before.. but I kind of need it to automate backing up my website. At the moment, I have: [CODE]#/bin/bash /bin/tar czPf /home/cpanelusername/etc/files/wp-content-weekly.tar.gz /home/cpanelusername/public_html/wp-content/[/CODE] but how do I get it to email me the file wp-content-weekly.tar.gz and then delete it? …

Member Avatar for serged
0
98
Member Avatar for sonja19

hi, Im just a novice in shell scripting,can you help me out; all inbound files will now have timestamp. the timestamp will be get from a server,specifically on a Moveit server. any help will do.. thanks.

Member Avatar for griswolf
0
176
Member Avatar for kirill1996

HELP ME, I accidently ended explorer.exe (my shell) in Task Manager. I went to New Task>explorer.exe>run and it only opened windows explorer but did not open my shell.

Member Avatar for purvansh
0
248
Member Avatar for cableguy31

I am trying to write a script that can accept multiple options. The issue that I'm having is some of the potential input will be search criteria. The syntax would be: script [list of patterns] [-t seconds] [-n count] All of the arguments are optional. So far, my thoughts were …

Member Avatar for edup_pt
0
233
Member Avatar for kandarpa

Hi I am tryibg to check for presance of a string in a big string. I tried as follows: [CODE]IS_VECTOR_TEST_CASE=`grep AIV "$PWD"` if [ "$IS_VECTOR_TEST_CASES" = "" ] then #do something else #do something fi[/CODE] This always giving me as if [ "$IS_VECTOR_TEST_CASES" = "" ] is true with following …

Member Avatar for kandarpa
0
108

The End.