1,891 Topics
| |
Hello, I am trying to use the awk command to print two columns. One of them has a percentage value. This is for file system monitoring. When i try to read it from a file it does not recognize the precent sign and ignores it. How can i convert it … | |
I have a script written in Korn that hangs. Please see code below and advise. TIA [code] login as: dgrin dgrin@cbdp57009's password: Last unsuccessful login: Sat Jun 13 13:06:21 CDT 2009 on ssh from dbtrsqc1.chris topherandbanks.com Last login: Tue Jun 16 21:46:51 CDT 2009 on /dev/pts/0 from dbtrsqc1.christopher andbanks.com ******************************************************************************* … | |
Hi All, I am a newbie to UNIX shell scripting. Kindly help me in below requirement i actually FTP a compressed file from UNIX to Windows server, while uncompressing the transfered file it actually contains a box character [] instead of a new line but i need it as a … | |
Hello, I am fairly new to scripting, I am interesting in writing a shell script which acts as a DOS command. I want to be able to utilize dos commands such as cd, dir, type, del, ren, and copy to do the same functions as the UNIX commands, cd, ls, … | |
Hi, i wonder if someone can help me with this, I am trying to get the results of top across multiple machines at the same time. I only care about the first process listed by 'top'. I can't figure out how to make this happen. I have got passwordless SSH, … | |
hi. Does this command (tar cvf /usr/local/bin) create a tape achieve in /usr/local and then copies all the files and directories that are in the /bin directory into the tape archive that is stored in /usr/local? If not then how does it work? I have looked around the internet and … | |
So, I had a quick question about having multiple arguments being read into a bash script. In the following script, if I type "./myscript -h", it returns "Hippo.". However, if I type "./myscript -h -k", the script returns only "Hippo." I would like to know how to have the script … | |
Hey all, Im creating a shell script that has an option to take a file to write the output into instead of displaying it on the terminal (stdout)...and then takes an arbitrary number of input files to process. Usage is something like this: $command [-option outputFile] inputFiles.... If the option … | |
Hey all, I have a dumb question to ask :(.. I want to know how to create a shell script that reads input from the STDIN as default, but when [-o inputFile] is entered as an option, it will read the input from the inputFile. I want to do this … | |
Hey all, I have a problem with using the grep command... Im trying to parse lines in a file and read only characters t,c,a,g lower or upper case...but i keep getting trouble in the outcome: for example axxxxtc should return atc but it doesnt... heres my code: result=`echo $line | … | |
Hi, I am having trouble inserting lines into a file via a Unix shell script, can anyone out there help me with this? Part of my file content looks like this: # default ssl qop [ssl-qop-mgmt-default] default = ALL I now need this part to read as follows: # default … | |
Hello, I'm brand new at shell scripts and I am attempting to complete a homework assignment but I am not quite sure what I am doing wrong here. The instructions are [B]Write a bash script that takes two arguments and generates a nicely formatted, plain-text, manual page for the command … | |
Bat file to move files onto a created subdirectory Hi, I have a folder with video files, and I want to put each one into its own folder, like this: Current: c:\videos\movie1.avi c:\videos\movie2.mpg To: c:\videos\movie1\movie1.avi c:\videos\movie2\movie2.mpg I.E. I want to create a subdirectory with the same filename (minus extension), and … | |
i am reading an i/p file input.txt as below and want to read all filenames as in highlighted in bold below and put them in a different file output.txt. can someone help me with a shell script to do this? thanks in advance regards brad input.txt --------- START TYPE:OPT INIT_SEQ:01 … | |
how do i display the path name to the bash shell? Thanks all | |
Hello everyone, I'm looking for some help with these simple tasks. I actually need this just for linguistic analysis, so I'm sorry for asking probably dumb questions. :) There is a simple code that uses grep to find lines that contain a certain word in one file. [code]linecount=`grep "someword" $1/*file.txt … | |
How would i go about storing the time it took to excecute my script into a variable? any help would be appreciated :) | |
[CODE]echo "Please enter a number between 0 & 100 followed by [ENTER]:” read NUMBER case $NUMBER in -ge 0 –le 49) echo "F”;; -ge 50 –le 59) echo "D”;; -ge 60 –le 69) echo "C”;; -ge 70 –le 79) echo "B”;; -ge 80 –le 100) echo "A” esac[/CODE] its syntax … | |
Hello , I got this script that read directories, create a zip file with the date of the file, and put all files in that date inside Zip: dir=/iscsi/webserver231/; for subdir in "$dir"/*/; do find "$subdir" -type f -name 'ex??????.log' -exec bash -c 'for f; do f=${f##*/ex}; echo "${f%??.log}"; done' … | |
Hi, I am writing a shell script, and need help with a small piece of code. It is as below: [code] CUST_1=filename b=1 c=$CUST_$b echo $c [/code] I want the output from this as filename, whereas I get it as 1. Please guide as if where am I going wrong … | |
Hi everyone, I'm trying to figure out how to pipe a filepath to the open command in TC Shell. What I'm trying to do is, to pipe the outcome of "which" (to find the current location of another script) to the default text editor. I tried [icode]which testscript.pl | open … | |
Hi, I have a shell script that is supposed to change the permission for my WWW folder so that Apache can access them. My current script is [CODE=shell]chown apache /var/www/* chmod 755 /var/www/*[/CODE] This works fine for /var/www/ but subdirectories of /var/www/ e.g. /var/www/html/ is still owned by samarudge (My … | |
@REM By unknown @echo off color 0A %~d1 cd %~p1 set _source_= set _dll_= :LOOP if "%1" == "" goto COMPILE if /i "%~x1"==".cs" goto SOURCE if /i "%~x1"==".dll" goto DLL goto SFT :SOURCE if "%_source_%"=="" goto S2 :S1 set _source_=%_source_% %~nx1 goto SFT :S2 set _source_=%~nx1 goto SFT :DLL … | |
Hi sed -f /opt/DBACheck.sql.sed /opt/DBACheck.sql > /opt/DBACheck.sql.tmp mv -f $DBACheck.sql.tmp $DBACheck.sql where the contents of DBACheck.sql.sed is { s%${DBMS_USER}%SYSTEM%g } DBACheck.sql is a one line file , that contains line with string DBMS_USER which i want to replace it with SYSTEM. But on executing i get DBACheck.sql to be an … | |
Hi. I have created a script that works perfect but I am now told that I could have done it better, but how? This is an example of how I did mine: #!/bin/bash # function users { echo "1. Password file" echo echo "Enter num: " read usernumber if [ … | |
I want to ls -l a filesystem, but only want the files 3 months old or more. I can't figure out how to test the files and get the results I'm looking for. Any ideas? | |
Hi all i'm hoping someone can help here my son is doing a school project and he's doing really well, he loves his computers, his project as come to a dead end as we're struggling to create a menu which will add users doing this in Bash. then adding a … | |
Hi, I want to write a reg file which will enable me to install firefox add-ons (xpi files) by clicking my mouse on the add-on file itself without having to drag and drop the add-on into the firefox window. Could someone help me on how to do this ? Thanks | |
I have to call this many times: [code] MyScript.py --top='?_0.png' [/code] where the 0 should be replaced with 0, 1, 2, 3, etc I tried this: [code] for i in {0..3}; do echo MyScript.py --top="'?_${i}.png'"; MyScript.py --top="'?_${i}.png'"; done; [/code] It seems to make the command look correct (ie the single … | |
I need to put some static pages into a mysql table This is a sample static page HTML Code: <title>acquital</title> <meta>acquital</meta> <type>lawglossaryitem</type> To be acquited of a crime is to be deemed to be innocent of the charges after a court hearing. This is different from a <a href=lawglos_Discharge.html>Discharge</a>, where … |
The End.