1,891 Topics
![]() | |
Please I want to build a program in scripting that will start a timer from 60 seconds and decrement every second.There should be an input where the user should be able to enter the secret password to dis-activate the timer-bomb.If the user fails to enter the correct password 3 times … | |
hi all i want to add a pattern (say XYZ) after variable $lineNum in some tempFile. How do i do this, preferably using sed ? for eg. Initially line 1 line 2 Later line1 my pattern line2 | |
Hi, I have a FTP shell script which is used to move the file from linux server to Windows FTP machine.Here my problem is some times because of network problem the files are not moving to FTP .Here i want to get the mail weather the files are moved to … | |
Please can i have the code of A shell script that will simulate food ordering system in a restaurant? Just a simple system will be helpful,i just want to learn and compare with other programming languages.Thanks | |
if line 5 of a file needs to be replaced with contents of $line, how could we possibly do this using sed ? | |
My input file looks like this [code] abc def \ ghi jkl && mno || hju [/code] My objective: to replace '' with line 2 newLine=`sed -n "2 p" inputFile` sed -n 's/\\/'"$newLine"'/p' inputFile | tee inputFile When i do this, the output i get is -> abc def abc … | |
Hi, I am trying to log a portion of the log file depending upon the "WorkOrderNumber" and "level". The shell script i've written is as follows:- [CODE]cat input.log | awk '/\[WorkOrderNumber/' | awk /120600012/ | awk /INFO/ | tee log.vw[/CODE] For a particular WorkOrderNumber, the record is very long (4253 … | |
I want to write a script where in i can kill the top processes and run this script for every 5 minutes.How to extract parameters from top command | |
when i run cat . i displays some weird characters which is fine, but after that i can not turn back to my normal directory path. it always shows some weird characters in my directory path too. Why? how to turn back? | |
Hi Guys, I have a file with lots of similar records example shown at end, I want to be able to delete one of the records and have the following line of code which finds the record I need to delete, my question is now I have found the record … | |
hi all, given a path, for example : /<pwd>/artist/album/ what i would like to do is to rename the album directory like that : /<pwd>/artist/artist | album/ and i would like to do the latter for all the "artist" directories and for all the "album" directories that belong to an … | |
ok. There is a window xp base production server contained video files for play out. There is another server which is a linux base server placed in the network of the window xp based production server. I normally copy the files in the windo xp production server to the linux … | |
Dear All, i have the linux machine. i am a admin(root) of the system. i have create a user yesterday. now i login user i saw this error.. pls help me... -bash: /home/user/.bash_profile: Permission denied | |
dear all,, I just try to make script to autosave an opened excel that auto refresh every 3 hours. Every 3 hours the data will be added to excel,, cause the excel will take data from database (that the cause I need to autorefresh). but I need to autosave it … | |
hello, i am writing my own shell and struck at implementing "help"....can any one help me .....plz just dont refer the man pages of linux plz elaborate also.... also plz some one tell me how to implement the background processing .....reply asaap its urgent thanks in advance | |
Can somebody suggest me, which book is best for shell script and available in India ?? | |
I have a helper script that will grab weblogs for a particular domain, if called by itself from the MS-DOS command line it works as intended, but I'd like to call another script to call this script multiple times for the multiple domains, but it's only running the first call … | |
HELLO I Am writin my own shell in linux, and making use of execvp() for handling internal commands but it does not supports cd...plz help also if anyone can suggest some another way to handle internal calls except using system() thanks in advance :-) | |
Hi, i hope I'm posting about right topic. I need to be able to move file(s) from a directory to another directory which the user does not have access to(i.e. they can't view/access the folder). Can this be done with scripts? The environment is a windows server 2003 network. -Thanks | |
I ran across the need to view a specific line of a file so I wrote this up. You can view a line or a range of lines for a file or compare two files. Check the command for the syntax. Drop it in /usr/bin/sln and enjoy. | |
This code changes color of prompt according to user, suppose if user is root then color would be red and normal user would have color black. This'll diffrentiate in users. | |
Here is a little spinner thing for the command line, used when your current bash script is waiting on a background/system process. The weird character is ^H or a backspace. | |
I know what your thinking, You and everyone else has always wanted a clock that sits at the top of your command prompt and tells you the time. Why ? I made this in first year when i spent countless hours programming and little in bed. I decided i needed … | |
Hello, I have used bash scripting for sometime in the past and know quite a bit of linux. But haven't used it in a long time. I am off job and took some data entry job where I need to do some stats work on a very long list of … | |
I am attempting to familiarize myself with BASH so i can work in a Unix environment. I want to export a shell variable to a simple C program but seem to be unable to do so. Here is the C program: (i am also very unfamiliar with C but this … | |
Helo frndz, I'm novice in shell scripting...I need ur frnd help to write a shell script for taking backups. This script should use cp command to take backups. Script can read the list of directories and destination directory from a file or ask user for this info interactively... Example: Only … | |
Hi Im writing a script where im using the date command in this format. [Datestart=`date '+%m/%d/%Y':'%H:%M:%S'`] Is their a way to force the date variable above to go back 5minutes?? I know their is a way in perl but i prefer writing this script in ksh | |
Hey Ive been asked (and I may add this to my system as well) to make a shell script that backups to all files in x location to another location in z. The thing is that the backup must only be made if one file has been changed. Example: /x … | |
Is it possible to change the desktop background, hide the desktop icons, and hide the menu bar (in windows) using a batch script? If not, could someone direct me as to how to do it in C/C++? Thanks | |
I want to run multiple test cases, for a java program. How can i write script that causes the same program to run for different test cases. Test cases need to be included in same file or different files? how to write the script? | |
HI Guys, Prob a very simple one but im stumped, I run the following command and get: [code] date Wednesday, 19 August 2009 09:20:59 BST [/code] But when I run [code] date -u '+%y%m%d.%H:%M:%S' 090819.08:21:27 [/code] My question is why is the second command an hour behind? In my environment … | |
Hi All Facing issue with using sed and globally replacing a word with date variable for a sql file. Any help would be appreciated. [code]sed -e "s/DATEST\/$DATESTART/g" $SQLREAD > $SQLNEW sed -e "s/DATEST\/08/25/2009:07:41:41/g" /uat/ut21_sysmon/quest/foglight/JJ/jjsql Suffix too large - 512 max: s/DATEST\/08/25/2009:07:41:41/g[/code] Thanks | |
Hi all I just have questions about how not to show messages after you execute a certain command. for example whenever you execute "which xxx" there will always be a message on the terminal saying its path or command not found will be written. is that possible to write a … | |
As mentioned in the title. I wrote a script that has pretty long execution time. Some user just close the window half way and in the end cause some file corrupted. Is there any way to prevent the user closing the window? (Like turn the 'x' button of the window … | |
I'm new at scripting and I need help with converting multiple ".TXT" files to one ".CSV" file. Each file will have a different number of lines, then after the last line there is a blank line then more data, I don't want to use the data after the blank line. … | |
Hi all, I try to make a system where client can send their sms (contained contact file in it that compressed) to server using sms gateway concept. In this case, server must handle 3 condition : registration, request sending file to server (by client), and request take file in server … | |
Hello, I would like to download a compiler that works with max os x MacBook Pro that when doing my Unix homework I can compile and then know it works before I go to the University's website to log in and run the program. Or do I have to use … | |
Hello, I am trying to write a bash shell script that does the following: I would really appreciate if someone can help me correct my code that i have written below: 1.Finds all *.txt files within my directory of interest (files are in sub-directories) 2. reads each of the files … | |
Please some one can you tell me what is @_ mean? | |
I am attempting to set a ulimit inside of a script to be run by TWS/Maestro. Can't figure it out. Does anyone have any ideas? :-/ | |
Hi, I want to upload a file recursively using curl command, the file is in the directory where i am running the script here is the details 1) The file rss.txt is in this directory [ashok@qa-adm-001 rss]$ pwd /home/ashok/rss 2) If i run POST request as a command, the file … | |
hai dani, pls anyone help me how to add data into filename actually i tried like this: $str|cat >> EmpFile for the above statement im not able to do coz even $str is also considere as command. how to insert the value? | |
I have a directory called "images" filled with about one million images. Yep. I want to write a shell command to rename all of those images into the following format: original: filename.jpg new: /f/i/l/filename.jpg Any suggestions? Thanks, Dan | |
Hi guys, I have the following information in a text file, which looks like this: -rw-rw-r-- 1 user user 12203 Aug 6 01:02 app1.sql -rw-rw-r-- 1 user user 12343 Aug 6 01:02 app2.sql -rw-rw-r-- 1 user user 12238 Aug 6 01:02 app3.sql I need to Trim the unwanted strings and … | |
Hi all, I am very new to shell scripting.I have the requirement like one program is there, if it is running leave like that only and if it is stopped it has to be restart and once again keep watching and it is stopped we a have to restart once … | |
Hi. iv'e been looking around the web trying to find a suitable script to use with my hltv servers , unfortunately to no avail :( . I'm just wondering if anyone here could perhaps help me out with a shell script to do what i need it to , i … | |
Hi, I call "set -o notify" to notify me when my background jobs finish. I find that the messages upon finishing are different: for some job, it starts sometimes with "[jobID]", sometimes with "[jobID]+" and sometimes "[jobID]-". I wonder what they mean actually? Do they mean the jobs are finished … | |
hey there...could I please ask for some help for my programming assignment. I having a problem in assigning values to a variables inside a function. I don't know what im doing wrong...any suggestions could be a great help..here is my code [CODE] a = 0 myfunc(){ echo $1 "Computation" a … | |
Hi all. I'm not sure if this is the correct place to post this, but whatever. I have a simple .reg file that adds the command 'Open Dos Box' to the menu that pops up when you right click a file (on windows) I want it to open a DOS … | |
I just need help understanding how DOS and BASH handle globs. All I ever see is the output but it's not giving me any knowledge on the whole process. How does dir * interpret the wildcard differently then ls *? |
The End.