1,891 Topics

Member Avatar for
Member Avatar for shawnk

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 …

Member Avatar for shawnk
0
2K
Member Avatar for grin2dan

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 ******************************************************************************* …

Member Avatar for msvinaykumar
0
164
Member Avatar for Codesearcher

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 …

Member Avatar for msvinaykumar
0
150
Member Avatar for ViLeNT

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, …

Member Avatar for sknake
0
135
Member Avatar for obiphil

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, …

Member Avatar for obiphil
0
108
Member Avatar for scottyscotty19

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 …

Member Avatar for versatileint
0
353
Member Avatar for SoulMazer

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 …

Member Avatar for SoulMazer
0
107
Member Avatar for blackrobe

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 …

Member Avatar for blackrobe
0
86
Member Avatar for blackrobe

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 …

Member Avatar for blackrobe
0
119
Member Avatar for blackrobe

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 | …

Member Avatar for blackrobe
0
150
Member Avatar for darnoc

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 …

Member Avatar for darnoc
0
177
Member Avatar for ViLeNT

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 …

Member Avatar for Aia
0
118
Member Avatar for eschreibman

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 …

Member Avatar for Salem
0
93
Member Avatar for bradc

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 …

Member Avatar for fpmurphy
0
86
Member Avatar for towelee
Member Avatar for dragonflyheli

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 …

Member Avatar for dragonflyheli
0
109
Member Avatar for tomtetlaw

How would i go about storing the time it took to excecute my script into a variable? any help would be appreciated :)

Member Avatar for wildog
0
92
Member Avatar for towelee

[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 …

Member Avatar for Salem
0
69
Member Avatar for joinup

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' …

Member Avatar for joinup
0
106
Member Avatar for iceman29

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 …

Member Avatar for iceman29
0
122
Member Avatar for Windkessel

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 …

Member Avatar for Windkessel
0
131
Member Avatar for samarudge

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 …

Member Avatar for samarudge
0
88
Member Avatar for waphon

@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 …

Member Avatar for Ancient Dragon
0
117
Member Avatar for shyamalaa

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 …

Member Avatar for shyamalaa
0
254
Member Avatar for scottyscotty19

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 [ …

Member Avatar for scottyscotty19
0
125
Member Avatar for rusman

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?

Member Avatar for Salem
0
95
Member Avatar for blueman

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 …

Member Avatar for JeoSaurus
0
96
Member Avatar for rational611

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

Member Avatar for roman123
0
61
Member Avatar for daviddoria

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 …

0
59
Member Avatar for externalaw

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 …

0
68

The End.