1,978 Topics
![]() | |
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 … | |
Hi, I've had a bit of experience with perl and shell scripting. I've been reading the O'Reilly Python book and have been having a go at replicating some of our perl scripts in python (v3.1.2). I'm looking to put something together than will parse through large xml files and manipulate … | |
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 … | |
why echo "\v\v\v" prints \v\v\v while echo "this is a moron" prints: this is a moron why \n was escaped but \v not? | |
The page: [url]http://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps.html[/url] shows the best place to change the shell prompt (which is .bashrc). However, the previous page of that document has a lot of escape sequences offered by the Bash shell for insertion in the prompt (From the Bash 2.04 man page) I found that \w (the current … | |
Hi, I've got a lexer created with flex (under cygwin). Normally I compile it to an .exe file. For the newest project I need a lexer to use in a bigger C# program running on Windows XP. Of course I can execute a file using System.Diagnostics.Process. But it is not … | |
Hello I am trying to compare 2 files using awk. They have the same seperators, same columns, same rows. I need to go through both and see at which line they differ, adn then save those differences to another file. I have tried many methods but none seem to work. … | |
Hi! I'd like to know if there's a way to save a webpage address, as HTML (like the browser displays it) and store it under a folder. What I want to do for my website is to create some sort of cache image of the index page, available for me … | |
what is the significance of the "\" and ";" at the end of the command? | |
for the above command what values are passed to the format string %s and %p inside the printf and how? | |
for find what is the difference between the two? | |
[CODE]find . -name 'my*' [/CODE] The quotes avoid the shell expansion - without them the shell would replace my* with the list of files whose names begin with my in the current directory. What thus the above statement mean? Isn't it doing the same thing I mean looking for file … | |
So here's my issue. I recently merged music libraries with a friend of mine, and I've been deleting some stuff that I don't like or whatever. The problem is my zune doesn't delete the folders the music was stored in, and keeps the album artwork stored as well. I want … | |
1. What is the difference between the system and exec family of functions? 2. I want to collect the output of the call from the system functions say. Say I execute this system("date"); Now say I don't want it to display the output rather it give the output as an … |
The End.