2,277 Topics

Member Avatar for
Member Avatar for tones1986

Hey guys - i am working off three files that contain information on associates and their sales. The files are: products: (product ID, name, price item) % cat products 103:sway bar:49.99 101ropeller:104.99 104:fishing line:0.99 ... 108:wheel:49.99 111:lock:31.00 102:trailer hitch:97.95 sales: (product ID,num. sold, date sale, associate ID) % cat sales …

Member Avatar for bobydavid71
0
222
Member Avatar for VernonDozier

I have a very simple shell script to stop the Apache server: [code] #!/bin/bash sudo /usr/sbin/httpd -k stop [/code] I named it "StopApache.sh". When I run it from the command line, it stops Apache. However, when I double click the "StopApache.sh" icon on the Desktop, I'm asked whether I want …

Member Avatar for jolies2
0
214
Member Avatar for komyg

Hi I've developed a C# program that takes a directory list as its arguments. What I want to do is execute a batch script that would run a command like dir /b and send its ouput to my C# program. I believe that if I were using Linux, my script …

Member Avatar for Salem
0
172
Member Avatar for sarasara

Hey all I have a php script that I need to be running 24/7 on a linux platform. I have a dedicated server with centos 5 that I have access via ssh. The php script is written so that it loops indefinitely. However, it inexplicably hangs after 30 - 60 …

Member Avatar for sknake
0
155
Member Avatar for polisetty

I tried to copy the content of one folder to another using the batch file. The below is the example. copy *.class c:\tomcat 5.5\webapps\serv\WEB-INF\classes In this, *.class is source which is correct c:\tomcat is the second arguement 5.5\webapps\serv\WEB-INF\classes as 3rd arg the 2nd ,3 rd arg are wrong how to …

Member Avatar for musthafa.aj
0
87
Member Avatar for elamigosam

hi I wanted to know if there is a way to make a shell file to connect with a ftp server to download only files that are not in the client already, the files are picture files and I want to download only the new added files not the entire …

Member Avatar for abhisek.sanyal
0
80
Member Avatar for reham84

hi all i want to take a paragraph from a file and append this paragraph after ^L in another fille using shell scripting .............could you help me

Member Avatar for issue9
0
115
Member Avatar for aswin_agarwal

Hello, I have a file say id.dat In this file each line contains only an id number. I have a group of files (say 1.dat, 2.dat, 3.dat,...., 50.dat). There are unspecified number of records in each of them. If any of these records contain any of the id number present …

Member Avatar for thekashyap
0
98
Member Avatar for naziatarannum

Hi All, I'm a newbie. I need to know if we can write a script that tracks the number of times an xls file was downloaded in a day. I tried searching many books & websites, but of no use. Kindly show me the way.. Please.. Thanks

Member Avatar for serpiko
0
342
Member Avatar for gubbu

I have a directlry with log files example (logs/server.log.2009-10-17 or logs/server.log.2009-10-18) 2009-10-17 01:33:00,710 Beginning a.gzip 2009-10-17 01:33:56,704 Completed a.gzip 2009-10-17 01:33:56,704 Beginning b.gzip 2009-10-17 01:34:45,828 Completed b.gzip Now I have a directory which has all these files as well and if you do "zcat a.zip|wc -l you will find the …

Member Avatar for JeoSaurus
0
113
Member Avatar for crazysoul13

Hi I need anybody to help me this command in UNIX SHell Scripting. It goes to a website and take a snap shot and stores it in directory. Thanks

Member Avatar for JeoSaurus
0
114
Member Avatar for palavi

HI All, I am not able to run a jar file in UNIX. I have a shell script which is throwing this error. [CODE]Exception in thread "main" java.lang.NoClassDefFoundError: dao/Demoface[/CODE] classpath no issues as i am executing all files in the same directory named scripts folder whch has all jars files …

Member Avatar for palavi
0
177
Member Avatar for tech291083

Hi, Need some good books for a Linux beginner on the following topics, could anyone please suggest me some good titles based on your experience, Sed & Awk Bash/Shell scripting Thanks a lot,

Member Avatar for tech291083
0
92
Member Avatar for dimitar.dk
Member Avatar for JeoSaurus
0
146
Member Avatar for modesto916

Hi guys, I am Brazillian and i don't know how to speak english very well, but, let's to the question: I need a solution to automatically write a sequence of number to a file, for example, to write automatically to a file the number 1 at 254, this is what …

Member Avatar for JeoSaurus
0
136
Member Avatar for kenshin88

Hello everyone,I need some help over here with grep i have this [CODE]grep -n hello filename grep -v hello filename grep -y hello filename grep -i hello filename grep -w hello filename grep -f file hello filename [/CODE] and i have to execute these commands with a different way. For …

Member Avatar for JeoSaurus
0
146
Member Avatar for johndoe444

Hi, The situation I am in is as follows: There are some computers in a network. They are sharing the same file server ie the same home directory. I am not sure how it works but logging from any machine using the same user name takes me to the same …

Member Avatar for JeoSaurus
0
110
Member Avatar for johndb

If I type [CODE]start microsoft word.exe[/CODE] or [CODE]start internet explorer.exe[/CODE] those programs won't start. If I type [CODE]start notepad.exe[/CODE] that program will start because I have the right name. Where would I find on my pc or on the web the correct terms / names to use when referring to …

Member Avatar for sknake
0
261
Member Avatar for ilove2smoke

Dear other forum members, I'm writing a script for my homework, but I'm scratching all over my head and still can't figure out what I did wrong. I appreciate if anyone of you can point out my errors. I thank you in advance. [CODE] -bash-3.2$ cat payinfo #!/bin/bash # #This …

0
63
Member Avatar for milanese

Hi, I am very new when it comes to batch files and I need to copy some files from a directory to another on a windows 2003 server. I have writeen a simple batch file which looks like this: [code]@echo off SET Day=%date:~0,2% SET Month=%date:~3,2% SET Year=%date:~6,4% SET cdate=%Year%%Month%%Day% SET …

Member Avatar for Aia
0
115
Member Avatar for MrHooper

Hello, I am new to shell scripting and am having some trouble writing a script that will work the way I want it to. I am good at the one liners, but when I try to string them together I get errors. I have a ftp server that will trigger …

Member Avatar for MrHooper
0
161
Member Avatar for chrisp200

What I am trying to do is use to retrieve information from a .txt file and use it in a drop down menu. I am using Cgi and not sure exactly how you do it. This is the shell script that will abstract the information I need for the drop …

0
89
Member Avatar for NewbieProgram

My professor wants us to write a script that will do the following: -Catch him online and output the time/day -Where did he login, ie College or Home (ip address provided is ok too) -What was he doing The crontab should run every 30 mins and automatically email him all …

Member Avatar for sknake
0
130
Member Avatar for Mattpd

I need to grep a line from a text file, and delete the fourth and fifth field. then save it back to the text file. If that wont work I could also grep the line, and delete the first number and everything after it on that line. Both would accomplish …

Member Avatar for hichnam
0
160
Member Avatar for Beencountry

Hey guys, Im in a basic programming class. Mainly using VBS scripting nothing else on Windows XP. All of the sudden my prof gave us this assignment for shell scripting. I don't know hardly anything about this. Objective: Create a single shell script in Windows/Linux that will do (all) the …

Member Avatar for cfajohnson
0
89
Member Avatar for railmaster7

I'm having trouble with some syntax errors, and also wanted to get an opinion of what I've written will work as needed. I'm writing an awk report script to organize data from a file and calculate the amount of sales. There are 3 kinds of lines that we will need …

0
73
Member Avatar for isxrc

Hi, I urgently need help with an assignment I must complete by tomorrow. I started Bash Scripting yesterday so am a complete newbie. I don't have time to teach myself Bash scripting so please don't redirect me to some tutorials. The assignment I have to do involves the following: the …

Member Avatar for Aia
0
127
Member Avatar for Member #662110

I know this sounds odd, but my laptop is throwing up Context Menu Handlers at random intervals, sometimes every second, sometimes every 30 mins. It acts as though I'm right clicking all the time, but I can assure you I'm not. Any ideas? I've tried downloading ShellExView from Nir Soft, …

0
21
Member Avatar for naziatarannum

Hi All, Please advise.. I need to create a script that keeps track on the number of times a file is accessed in a day. Can we use events/triggers if any.. If a file is accessed, then event should increment the count variable. I need to know more on events/triggers …

Member Avatar for peter_budo
-1
110
Member Avatar for roadwarrior

I need to remove all lines that contain spaces in a file. I know very little bash. Any help would be greatly appreciated.

Member Avatar for sknake
0
79
Member Avatar for rafaele-elvis

Hi everyone, Every time I start my laptop, I must point to Places menu and mount the drive D: where contains my documents. D: and Linux partition are different. I want to mount automatically when the computer starts. How does that make such that? And the other one is: I …

Member Avatar for here2serve
0
132
Member Avatar for srujanasadula

i have a file a.txt which contains "ysm.set.ac4-qa.sds.audit add yinst setting yti. YTI_ HOST_OVERRIDE =qa-sav-midas-002.ysm.ac4.yahoo.com" I have variable STR which is dynamically assigned the value "HOST_OVERRIDE=qa-sav-midas-002.ysm.ac4.yahoo.com" I need to grep $STR on the file a.txt as `grep "$STR" a.txt ` But because of the spaces before =, the line is …

Member Avatar for issue9
0
113
Member Avatar for Godflesh

Help me please! I have problem with this code, i get the fault mess at <1>, line 11 syntax error near uexpected token 1, what is the problem. #!/bin/bash typeset -i HITTA=0 typeset -i TELENUMMER=0 typeset -i ACTION=0 echo "<<<<TestNinsse´s telefonregister>>>>" until["$ACTION" = x] do case"$action" in "<1>")read HITTA; grep …

0
105
Member Avatar for Goddan

Hello! I have another issue that i cant solve. How do i search after a string in a text file and remove it when it get a match?

Member Avatar for issue9
0
284
Member Avatar for Goddan

Hello! Im rather new to linux and scripting i have a small question. Will this syntax work read $hitta | grep '$hitta' nummer.txt ;; I was planning to read the input from the user and use grep to find it from the file nummer.txt It dont work so well:)

Member Avatar for issue9
0
57
Member Avatar for Chowley

Hello. I cannot for the life of me figure this out. It was all running fine until i added another while loop for the directory part, same as the first one. Then i removed the loop and started getting this error. syntax error near unexpected token `fi' I have an …

Member Avatar for Chowley
0
559
Member Avatar for srujanasadula

A string variable taking any kind of string has a value "yjava_jboss.log4j_file_appender_pattern_layout='%d .//- %x %-5p [%c] %m%n' " at some point of time during execution. It is to greped on a file that contains with value. I used grep "$STR" <filename> ,where STR during execution takes value as shown above. …

Member Avatar for srujanasadula
0
141
Member Avatar for aliyesami

here is the thing i am trying to do . I have a system variable called $OOCEA_INCOMING_READY, I want to be able to construct this variable name inside the script and use it. I am passing part of the variable name OOCEA as parameter but i am not able to …

Member Avatar for masijade
0
128
Member Avatar for guest7

Hi, I am trying to replace the old_string with the new_string using sed. But i am unable to do it using the following script. [CODE]#!/bin/sh old_string="p cnf 10 20" new_string="p cnf 98 99" sed -e 's/old_string/new_string/' file1.txt > file2.txt [/CODE] Contents of file1.txt [CODE]p cnf 10 20 1 2 3 …

Member Avatar for chrislee.980
0
104
Member Avatar for naziatarannum

Hi all, I have a simple question as it appears. But am unable to get the solution. Question is -how do I get the access time of a file in unix. please advise on the command. Thanks

Member Avatar for Aia
0
115
Member Avatar for avirag

Hi all, Can anyone tell me HOw to make a batch file for creating a shortcut on desktop in HTML....? Well i made a application in HTML, and i put this application in CD, now i want that when user run that CD, So Cd will automatically create a shortcut …

Member Avatar for avirag
0
84
Member Avatar for contactnaveen

I want a shell script program for this purpose and here is my requirement. I have two files 1.txt and 2.txt In 1.txt I have the following contents: label.abcd.1 = asdfgf label.abcd.2 = qwerqwe label.abcd.3 = zczxvzx label.abcd.4 = ;lkjj;l label.abcd.5 = pupoiup and in 2. txt I have the …

Member Avatar for issue9
0
243
Member Avatar for dena

hi please can any one help me in my shell project like this : Develop a c program which serve as s shell interface that accepts user command and then executes each command in separate process. The shell interface provides a command prompt ( sh> ) after which next command …

Member Avatar for dena
1
736
Member Avatar for Mattpd

My ultimate goal is to fill an array with user inputted positive and negative numbers. This script I wrote is very limited, but it should give you an idea of what I am trying to do. Basically, I ask how many numbers and then reserve 3 spaces for each number …

Member Avatar for Mattpd
0
194
Member Avatar for Mattpd

I am trying to delete any line of text that contains "$npname" and the word "in." The script works if $npname is only one word, but if it is more than one work I get "error: unterminated address regex" How can I fix this? [CODE]sed '/'$npname'.*in/d' parts.txt > parts.tmp[/CODE]

Member Avatar for Mattpd
0
4K
Member Avatar for nimesh g

Problem: Software Versioning Problem Type : Complex ABC corp. makes a large range of softwares. They always need to distribute new patches and updates to their existing users. The updates may have dependency on earlier versions and hence the update process may vary for different users, depending upon which version …

Member Avatar for masijade
0
192
Member Avatar for naziatarannum

Hi, Please help in this regard. Can the modification time of a file be updated to any date of our choice? Please advise. Thanks in advance!

Member Avatar for naziatarannum
0
126
Member Avatar for naziatarannum

Hi, Am new to shell scripting. Please advise me as to how to write a shell script that checks a set of files under a directory, if the files are not updated/modified today then an alert mail should be sent to certain mail id. Please help. Am new to this …

Member Avatar for naziatarannum
0
154
Member Avatar for raigs

I'm trying to make a simple search script but cannot get it right. The script should search for keywords inside files. Then return the file paths in a variable. (Each file path separated with \n). [CODE]#!/bin/bash SEARCHQUERY="searchword1 searchword2 searchword3"; for WORD in $SEARCHQUERY do GREPINPUT=$GREPINPUT" | grep --ignore-case --files-with-matches -e …

Member Avatar for Kruptein
0
117
Member Avatar for whizkidash

Hi Team, Need your urgent help for the same Well i have a file which consist of million records. Question is : Prepare a script which will cat that particular file..and then,the user will be asked to choose which line in the file he needs to modify the word and …

Member Avatar for sknake
0
200

The End.