1,891 Topics

Member Avatar for
Member Avatar for xsach

i need to read a text file and find a particular column in that text file ..i have no idea on how to do it ..can anyone help please..

Member Avatar for cfajohnson
0
183
Member Avatar for Muhammad Anas

Hello Friends, I am an absolutely beginner in the world of computer programming. I started my voyage in this world yesterday by starting learning Python. I am reading an e-book on python [URL="http://openbookproject.net/thinkcs/python/english2e/"]here[/URL]. That book has been written with examples from Linux platform. So, I felt this problem while going …

Member Avatar for snippsat
0
437
Member Avatar for abhelp

I have a directory listing with many subdirectories having many files. I want to recursively search for the oldest 5 files starting from the base directory and not 5 from each subdirectory. I am writing a shell script which sorts them using ls -lRtur|egrep "txt|jpg" > /tmp/file1 Now from this …

Member Avatar for griswolf
0
639
Member Avatar for bgk111

Hey all, Ill try to keep this short. I am trying to issue a command to another computer using ssh (ex ssh user@host 'csh /home/usr/SCRIPTS/tp.csh) and am getting some annoying error messages. when I run the tp.csh program on the host machine, it runs fine, when I issue the above …

Member Avatar for bgk111
0
240
Member Avatar for tejasthacker

PLEASE HELP ME WITH THIS QUESTIONS, I AM NOT POSTING MY WHOLE HOMEWORK BUT ONLY THE QUESTIONS WHICH I AM NOT SURE ABOUT. 1)What command will set the permissions to 744 on the file /home/fred/.bash_logout Choose one answer. a. chmod a+r,g+r,o+r /home/fred/.bash_logout b. chmod u+rwx g+r o+r /home/fred/.bash_logout c. chmod …

Member Avatar for ryan858
0
117
Member Avatar for csmgsarma

Hi all, I want to add a route on Solaris machine for each IP I am pinging. I am added static route for each IP as here: [B]route add -net 10.116.80.21 -netmask 255.255.255.255 10.116.80.18[/B][interface id 10.116.80.21, gateway = 10.116.80.18] [B]route add -net 10.116.80.23 -netmask 255.255.255.255 10.116.80.18[/B] [B]route add -net 10.116.80.25 …

0
53
Member Avatar for laserlars

Hi! Long time since i done any bash scripting. Is it possible to pass a arguments in functions? Something like: [CODE]recivefunc(SOMETHING) { echo $SOMETHING } passingfunc() { SOMETHING=test recivefunc($SOMETHING) } [/CODE]

Member Avatar for nezachem
0
83
Member Avatar for complete

What is the name of the Windows System Menu button? I am talling about the round glass-orb looking object (on a Windows 7 operating system) that appears in the lower left of the screen -- usually -- that you can click on to see the menu selection of programs on …

Member Avatar for Aia
0
143
Member Avatar for niconico96

Hello. I have a file, with some HTML in it. I would like to make a shell/bash script that moves ALL of the content of that file into ANOTHER HTML file at a CERTAIN line number... Does anyone have any suggestions? If not possible at a certain line, then at …

Member Avatar for niconico96
0
158
Member Avatar for Dr.Acula

Hello. I have a string that im trying to pull text from. But I want it to pull the text between certain points. Is this possible? For Example: DABHolly,BuddyDAL1466 N Scooby AveDAIAtlantaDACGADAQ =========================== ========= Is there a script that can pull the text between DAB & DAL, DAL & DAI, …

Member Avatar for scaiferw
0
152
Member Avatar for niconico96

Hello. I have a file, with some HTML in it. I would like to make a shell/bash script that moves ALL of the content of that file into ANOTHER HTML file at a CERTAIN line number... Does anyone have any suggestions? Thanks a lot in advance ~ Nikhil

Member Avatar for crunchie
0
172
Member Avatar for vs.vaidyanathan

when i do a stderr redirect to stdout, does the shell open the stdout file? if so is there any way i can capture the opening of this file? basically what i want to do is at the firstinstance of an error i want my perl script to die and …

0
86
Member Avatar for zilch

I have an input file having 7 fields delimited by , eg : 1,ABC,hg,1,2,34,3 2,hj,YU,2,3,4, 3,JU,kl,4,5,7, 4,JK,KJ,3,56,4,5 The seventh field here in some lines is empty, whereas the other lines there is a value. How do I insert string NULL at this location (7th loc) for these lines where output …

Member Avatar for griswolf
0
89
Member Avatar for rhoit

what is this "Werid charaters" its screwing my downloads... but echo seems to be find can any one know the solution pls!!! THis is what i did.. .only 1st seq goes fine... something goes stupidly wrong with this stuff.... [CODE] rhohit@64box:~/383 Anxious Friends$ for i in $(seq -w 1 18 …

Member Avatar for rhoit
0
128
Member Avatar for rohit_static

Hi , I actually have a script to bundle up two files but i don't know how it works .Can someone please explain. Here's the script:- [code] for i do echo "echo $i 1>&2" echo "cat >$i <<'End of $i'" cat $i echo "End of $i" done [/code] now suppose …

Member Avatar for nezachem
0
193
Member Avatar for hulk33597

hello friends.... i need some command for my project which can close active window by invoking alt-f4 without pressing alt-f4 key or by other mine..plz help....

0
55
Member Avatar for sansogam

Big prize shell script competition on Topcoder Given below is the link for the same [url]http://software.topcoder.com/review/actions/ViewProjectDetails.do?method=viewProjectDetails&pid=30011725[/url]

0
125
Member Avatar for xsach

can anyone pls tell me how can i read the contents of a file in reverse order....ie i'm storing the num from 1 to 100 in a file but i wen i read thre content it shouls start from 100 99 to 1..i tried to sort /r but it does …

Member Avatar for utpalendu
0
99
Member Avatar for marco64

Hello, I would like to know if you know any framework/classes for systems administration in windows/linux environment. Thanks for you replies! Bye, Marco.

0
144
Member Avatar for Euphobia

Not sure this is the right place to put this. I have a batch file for a program that I'm writing, which takes a C source file, compiles it and runs it, and then tries to save the output of it to a .txt file. The program lets a user …

Member Avatar for Euphobia
0
169
Member Avatar for johndoe444

I logged into a computer which is not mine. I know there is apache installed because when I type whereis apache it shows /etc/apache it has only a few files. I need to know where the htdocs directory is and also where http.conf file is. How do I accomplish this? …

Member Avatar for griswolf
0
264
Member Avatar for newbrobo

I have a hp mini linux, ubuntu 08.04. Of course I couldn't resist temptation for the 10.04, that I upgraded following ubuntu geek forums. I got lost in limbo somewhere when I couldn't figure what i was to follow! It is a netbook and I have 10.04 but, have an …

Member Avatar for finito
0
137
Member Avatar for rudasi

Hi, Im trying to make a batch script which can go through a directory and pick all the .txt files and copy the name in a file. Ive been able to make a script which can do this in a particular folder but if there is a folder in the …

Member Avatar for rudasi
0
114
Member Avatar for whizkidash

Hi Team, Problem Description: Well i have a script with me(attached) which monitors the response time of each file and sends mail according to its severity As i am very new to this script it involves mix of korn shell plus html. Request your guidance on the same. Requirement: Presently …

Member Avatar for whizkidash
0
182
Member Avatar for JhonRR

Hello everyone, I'm trying to write a script, i would like to say the child process will kill the parent process how would i do that? Thanx,

Member Avatar for griswolf
0
66
Member Avatar for fattest

i am writing a small script and part of it requires comparing two version strings in the form V[1-9].[0-9].[0-9].[0-9] The script will perform some action if the two strings have different subversions (STRING1=V1.1.0.2 and STRING2=V2.1.0.4 for example). So far the script is [CODE]for i in {1..4} do if [ $STRING1[(ws:.:)$i] …

0
86
Member Avatar for man5237

Please help me to write a shell script to find the GCD (Greatest common Divisor) of [B]3[/B] numbers. Thanks in advance.

Member Avatar for kvmreddy
0
3K
Member Avatar for phummon

Hi everyone, I'm a relative beginner to writing UNIX scripts. In the past, I've been able to hack together simple scripts. Now I need a script which a little more complex than I'm used to, and I really need help. I'm up against a tight deadline and am growing desperate, …

Member Avatar for phummon
0
167
Member Avatar for adam2009

Hey, I have a c# code that connects remotely to a winServer2008 machine (with a local user of that machine). How do I configure via automated code the logon script that will be executed as soon as the connection is established ? Cheers,

0
83
Member Avatar for ConCon

Can someone look at this and tell me why I'm getting an empty tar? [code] #!/bin/sh #### mysqldump --opt --user=[my username] --password=[my password] | tar cvz > backup.tar.gz #### echo | mutt -a backup.tar.gz -s \"Database Backup\" [my email] #### rm backup.tar.gz #### [/code] Thanks!

Member Avatar for ConCon
0
217
Member Avatar for geetz

Hi.. I am trying to popup 53 uri's in single firefox window in tabs..But using the given code am getting it in different windows..Can anyone check dis out..n help me to correct it.. #!/bin/bash processLine(){ line="$@" # F1=$(firefox $line?wsdl | awk '{ print $1 }') #firefox -new-tab "$line?wsdl" firefox $line?wsdl …

Member Avatar for griswolf
0
283
Member Avatar for hcrgluserp

trying to remove a user account from local pc's.. if account not there want to go and remove a different account is there a way to capture the 2221 error i.e. NET HELPMSG 2221 or just a flat out if %errorlevel%..and I've seen many different ways to handle errors..what is …

0
60
Member Avatar for spider22

I am looking for a script which will check web folder [url]http://www.site.com/folder[/url] and compare is with root>folder. If new files are found download them in root>folder>temp. I need bash scriipt .. Can anybody help?

Member Avatar for Salem
0
43
Member Avatar for Ca67

Hi I have been working on an assignment and have run into some problems. The assignment is an awk script that splits the shell script into BEGIN and END. In particular, the problem is in the END section with the sorting of a numeric array. I have tried the following …

Member Avatar for LordNykon1121
0
118
Member Avatar for ajay_p5

Hi well I am facing some problem while trying to concatenate contents of several files, present inside a folder. My code gives an error: ./test.sh: line 17: [: =: unary operator expected and in similar lines Attached is the code: [CODE] #!/bin/bash str1="test_concatenated_RAxML_outputs.txt" str2="r_test_concatenated_RAxML_outputs.txt" str3="m_test_concatenated_RAxML_outputs.txt" str4="n_test_concatenated_RAxML_outputs.txt" str5="h_test_concatenated_RAxML_outputs.txt" for line in …

Member Avatar for griswolf
0
205
Member Avatar for kneiel

Hi i am trying to write a script to match a '' at the END of the line. For eg. i have a file Temp1 which contains :- [code] a = b + c \ +d; printf("\n"); [/code] Objective: To match the '' in the 1st line and NOT the …

Member Avatar for cfajohnson
-1
889
Member Avatar for daryll1

Hi, as a bit of background, My Uni have lately implemented a CGI script so you have to log in to be able to use the wireless. This would be OK but they are terrible programmers and instead of timing out after a period of inactivity it will time out …

0
135
Member Avatar for becdudek

Hey, im new to scripts(stumbled on them a few hours ago) and was wondering if and how i am able to modify functions from a website's page source. i have greasemonkey etc, so would i copy/paste the function into a new script and make my modifications or something, it didn't …

Member Avatar for becdudek
0
68
Member Avatar for masza

previously I apologize for my bad english. I am still new to linux. I just wanted to ask about shell programming, how influential shell programming on linux? Is there someone who has an article or an e-book about pemrogrman shell for beginners? May share here? thanks :D

Member Avatar for gerard4143
0
53
Member Avatar for -lodogg-

I have a shell script that currently pulls data from a mysql database and writes it to a .csv file. The problem is I would like to do a whois lookup against each public IP to see where they are coming from. I basically have two firewalls writing syslog data …

Member Avatar for rch1231
0
82
Member Avatar for k2k

anyone has ideas? i could cd to %ProgramFiles%... or move folder anotherFolder [code] move folder %ProgramFiles% The syntax of the command is incorrect. [/code] thanks thanks

Member Avatar for k2k
0
113
Member Avatar for disssko

Hi, I'm trying to make a script in Linux which should send release note to a certain distribution list. Both the release note and distribution list are kept in a separate file. I already have initial distribution list, but it is taken from Outlook so I'm pretty sure the Linux …

0
103
Member Avatar for satimis

Hi folks, I use following script:-[code] #!/bin/sh # cd Linbread TODAY=`date +"%m%d"` DATA=`grep $TODAY linbread.dat` HOUR=`date +"%H"` if [ $HOUR -le 11 ] then TOD="Morning" elif [ $HOUR -ge 12 -a $HOUR -lt 18 ] then TOD="Afternoon" else TOD="Evening" fi echo $DATA | gawk -F"|" '{printf("%s\n\n%s",$2,$3)}' > $$tmp fold -s …

Member Avatar for Robert Robinson
0
111
Member Avatar for chris5126

HI guys, I have the following code which redirects all standard input and error to the screen and to a log file, I would like to change it so it only redirects standard out and all standard error goes just to the log file can anyone help: [code] #capture all …

0
56
Member Avatar for fallingstar1

I need help creating a script allowing one file to move to another folder and when moved the date and time should be appended to the end of the file name. Please help thank you FS

Member Avatar for Salem
0
96
Member Avatar for chinnaedu

HI all, am working on an opensource project(in Linux).. I need to modify the string ,which is a part of the Folder,File,and others as such.. I have code to replace the string which is in content of the file....but i want the replacement to be done on the folder names …

Member Avatar for chinnaedu
0
86
Member Avatar for Dream2code

Hi All, 1)I want to watch a directiory in unix using a shell script. 2)In case any change happens to any of the files inside that e.g new file creation or new directory creation or any file modification we need an automated mail. 3)Mailing part i will take care 4)on …

Member Avatar for Dan08
0
156
Member Avatar for 123a

I need to create a shell script which will output certain lines in a file. For example ./line file1 6 11 will output lines 6 to 11 of the file. I am not good at shell script, I am a beginner. I have tried to write this script but just …

Member Avatar for ben1
0
188
Member Avatar for mmnewbee

Hi I,ve recently joined daniweb and was wondering if you guys might help me in writing a shellscript that automatically detects whether a flashdrive has been inserted into a usb port and recursively searches all folders deleting any .exe files it encounters. Thanx.

Member Avatar for mmnewbee
0
73
Member Avatar for NorthPole

I want to create a matrix in a bash /awk script in order to save some statistics about user activity (the statistics are stored in log files) how can i have matrix in bash script language (or maybe using awk)? is it possible to write something like? [CODE]matrix[n] matrix[1]=$2 a=expr …

Member Avatar for NorthPole
0
104

The End.