1,891 Topics
![]() | |
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.. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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] | |
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 … | |
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 … | |
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, … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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.... | |
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] | |
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 … | |
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. | |
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 … | |
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? … | |
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 … | |
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 … | |
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 … | |
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, | |
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] … | |
Please help me to write a shell script to find the GCD (Greatest common Divisor) of [B]3[/B] numbers. Thanks in advance. | |
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, … | |
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, | |
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! | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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. | |
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 … |
The End.