1,817 Topics

Member Avatar for
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
129
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
247
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
137
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
82
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
57
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
131
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
381
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
147
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
364
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
163
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
231
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
107
Member Avatar for Pawan Tolia

Can some body help in writing the shell script to copy the nightly file from windows server to unix server. Thanks in advance

Member Avatar for sonja19
0
110
Member Avatar for Member 784878

How to convert following dos batch code to unix shell:- echo Database username and password will be taken from liquibase.properties file.... setlocal ENABLEEXTENSIONS for /f "tokens=1* delims==" %%a in (liquibase.properties) do ( if "%%a"=="username" set dbuser=%%b if "%%a"=="password" set dbpwd=%%b if "%%a"=="url" set dburl=%%b ) echo. echo UserName is:=%dbuser% echo …

Member Avatar for griswolf
0
142
Member Avatar for faby

Hello everyone, I am presently working on speech synthesis/speech to text on Ubuntu 10.04. So far I've been using festival but I discovered espeak which is also cool by reading other people's previous questions and answers. My main goal is to develop a communication system whereby festival or espeak can …

Member Avatar for fpmurphy
0
623
Member Avatar for crystaliao

hi everyone, Originally I had a script like: telnet host port then type STATUS for checking remote server,local server status and connection. In order to omit typing "STATUS", now I'm trying combine these two commands into one line, how to write it? or do we have another way to achieve …

Member Avatar for griswolf
0
202
Member Avatar for sarosh

hi, suppose i have many windows open like two image files, a terminal , a firefox. and using command line i want to exit specifically 1 of these.. how can i do this? is there any shell command to do this? thanx... i am waiting for reply. its urgent! m …

Member Avatar for sarosh
0
121
Member Avatar for dhanapal86mca

Can any one tell me Difference between Dos printing and windows printing explain with a bat file

Member Avatar for rch1231
0
52
Member Avatar for bojomojo

Hello, I have a file with each line consisting of certain fields. Lets say I want to detect which lines have the second field equal.. For example here is the file: [CODE]XM2 N$2 N$2 GROUND GROUND nch_mac1 l=50n w=150n multi=1 nf=1 sd=140n XM1 N$12 N$2 GROUND GROUND nch_mac2 l=50n w=150n …

0
74

The End.