1,891 Topics
| |
hai dani, i have a problem with listing the contents of file in another directory. my default path is in /home/pallu where my file called DirProg script exists , now i want to find any file which starts with a or A in a dir and store the content in … | |
can anyone modify my code to make it recursive search of subdiretories, currently this code only can search of particular directory. #!/bin/bash if test $# -eq 0 ; then echo usage: "${0##/*} [Dir name]" exit fi for arg in $* ; do if test -e $arg ; then maxLen=0 # … | |
Hello dear people, I have a bit of a problem, I need to change something and I am not sure how. I need to change (see: Codification) To look like. [[Codification]] Of course the word codification can also look like (see: PrimaryLegislation) And then it needs to be [[Primary Legislation]] … | |
| Hi guys, I've come to a road block so i need some help. 1)I have an exe which i need to run at start up. So I put the following bash file in the inid.d directory: [code] #!/bin/bash # # . /etc/rc.d/init.d/functions EXE_DIR="/root/monkey-0.9.2/bin/" EXE_NAME="monkey" ############################################################# #################### Functions ############################## ############################################################# function … |
Hi, can anyone please help me on this. I dont understand as to why am getting this error.. Please, please help on this! fortesting purpose I have commented certain lines.. [CODE]"Pre_s2a_leadtime.sh" 55 lines, 1233 characters #!/bin/csh # Check if program is already running and echo a time stamp for the … | |
Hi, I am using a set of tools called FWTools which runs commands in the shell window. One command that I am using edits tif files by adding an overview to the file. The syntax is: gdaladdo -r average "D:\Map Files\Tiffs\ST00.TIF" 2 4 8 16 32 What I need to … | |
I have a problem with the Nesting of case statements. This is a Simple restaurant program which simulates food ordering. I used Case statements to Display Multiple nested menus base on the users choice But i seem to have a problem with the esac,seems my nesting is wrong.Pleas any help … | |
I am a beginner in shell programming in Unix. My current problem is log file analysis based on a given time range for listed dates. The file is a long file and I need to sort IPs based on a user input through terminal. For example, from the end of … | |
What am I doing wrong? [code=bash]for filename in /home/darragh/public_html/test/* do sed -i 's/..\/config/.\/config/g' done;[/code] It just gives me: sed: No input files | |
Hello, I'm new in shell scripting and i face some problems. I need your help to calculate a logarithmic expression in shell script for example i have 2 variables x1 x2 $x1=3 $x2=5 $Result=`expr x2 * log2 x1` ???? $echo "Result is $Result I know that this is wrong and … | |
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. |
The End.