1,892 Topics

Member Avatar for
Member Avatar for networkingnub

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

Member Avatar for sknake
0
96
Member Avatar for alvingo

Hi All, Second time to post on this group :) I'm pulling my hair now 'coz I'm so dumb to produce this requirement. Requirement: I want to run a utility by limiting the no. inside my process (mov##) to be able to use in multi streaming. Here is my script: …

0
68
Member Avatar for alvingo

Hi Guys, First time user & new to scripting. :) I have my shell script like this: [CODE] #!/usr/bin/sh e_id=`sqlplus -s scott/tiger@DB<<eof SET PAGESIZE 0 FEEDBACK OFF VERIFY OFF HEADING OFF ECHO OFF; select emp_id from employee; quit ` echo "Employee ID's $e_id" group=GROUP1 # Getting the sss_no for each …

Member Avatar for alvingo
0
129
Member Avatar for ViLeNT

I want to write a script that makes sure users' home directories don't contain world writable directories, directories owned by other users, or other potential security problems. I'd like to echo any directory where one user's home directory can be modified some by another user. Can someone help me with …

Member Avatar for sknake
0
469
Member Avatar for ViLeNT

Hello, I'm still fairly new at shell scripting, can someone please show me how I would go about accomplishing a script to tackle these tasks? I've got a server setup. I want to find duplicate files that are taking up all the space on the hard drive. I want to …

Member Avatar for ViLeNT
0
204
Member Avatar for maresi

Hi! I run Linux (easy peasy) on my netbook and have decided to encrypt the folder of my mail-client (in this case: evolution) via encfs. So I wrote a little shell-script that does all the necessary steps: [LIST] [*]ask for the password [*]decrypt and mount the directory [*]start evolution [*]umount …

Member Avatar for maresi
0
208
Member Avatar for friiday

Hi all :) I am new to the batch file, never heard it before and thus need help from all of your. I need to create a batch file (.bat) that will execute a C# application which is written in Visual Studio 2008. Someone please assist me and give me …

Member Avatar for sknake
0
111
Member Avatar for prashanth s j

Hi all, I need to create thousands of directories in a single parent directory using shell scripting code. One problem would be to generate the unique directory name for each of the 1000 iterations to create a directory every time. ie first time the directory name needs to be subdir1 …

Member Avatar for Dream2code
0
199
Member Avatar for shawnk

hi, I have created a script that has some sql queries in it. It seem to work fine and e-mails me the output file but when i use this command [COLOR="Red"]'col email format a20'[/COLOR] it creates a dead.letter file and i never get the e-mail. Any help would be appreciated. …

Member Avatar for shawnk
0
53
Member Avatar for Thireus

Hi guys, I have a simple question, I want to store the output of the following command: [QUOTE]sudo iotop -t 0 -C 3 | grep "load: "[/QUOTE] As you can see it is running all the time, and we get a new line every 3sec. I just want to store …

Member Avatar for Thireus
0
192
Member Avatar for ermithun

i have a file, say , abc.log which contains data like, [code] 123_1 123_2 123_3 123_4 123_5 123_6 123_7 123_8 123_9 123_3 123_5 123_3 123_7 123_6 123_1 123_3 [/code] [COLOR="Red"]As we can see, there are 16 rows. Now i need to grep for a pattern like '123_*' but want to …

Member Avatar for Dream2code
0
95
Member Avatar for emarcel

Hi Guys, I've got a small issue passing the string from command line parameter into the variable within the script. An issue is when the parameter contains an equal mark in the string that brakes the line and the everything after an equal mark is missing. See an example: script.bat …

Member Avatar for hkansal
0
76
Member Avatar for daprezjer

Pretty new at shell scripting. My server was hacked and instances of links for viagra were placed in it. I have lots of sites, so I need to search for all instances of "viagra" and list the files, so I can go remove the intrusions. Can this be done using …

Member Avatar for Fest3er
0
116
Member Avatar for serkan sendur
Member Avatar for JohnE1

O/S: Linux Shell: BASH I know of 4 different ways to use a for loop: 1. for I in {1..10}; do echo $I; done| 2. for I in 1 2 3 4 5 6 7 8 9 10; do echo $I; done| 3. for I in $(seq 1 10); do …

Member Avatar for sknake
0
93
Member Avatar for anubhav400741

I have written a shell script below while running this script , we have to give inputs manually, now i want that we are getting inputs in excel file ..can we automate this , this was a project for me , i am alreday late ..please help me soon [code] …

Member Avatar for csayantan
0
138
Member Avatar for axn

[ICODE]while getopts htn: OPTION do case ${OPTION} in t) LIST='john mike smith' ;; n) LIST='rob peter joe' ;; h|*) show_usage exit 0 ;; esac done shift $(($OPTIND - 1)) args=$*[/ICODE] above is a snippet of code. i would like to use more than one character in my options e.g fname …

Member Avatar for sknake
0
115
Member Avatar for scotddn1

[CODE]$dgs = new IO::Socket::INET(LocalPort => $lisport, Proto => 'udp') or die "Socket: $!\n";[/CODE] I have a perl script that I want to run on tomato firmware router using the current shell scripting that it supports How would I do the above in shell? In perl you have to use IO:Socket.

Member Avatar for Salem
0
163
Member Avatar for PatrixCR

hi. I'm a newbie in shell scripting as well as the *nix OS. I just wanna ask about the symbol [B]#![/B] that I saw in many shell script examples. For instance, [ICODE][B]#![/B]/bin/bash[/ICODE]. What does the [B]#![/B] symbol means? What's the meaning of [B]$1[/B], [B]$2[/B], [B]$3[/B] symbols? and what does the …

Member Avatar for sknake
0
169
Member Avatar for rajenpandit

Hi everybody, I have a problem in include path. i want to keep my all header file in folder named myInclude and include it like #include<myInclude/header.h>, Is there any possible way to do this, if there is than please tell me the step. thanks in advance...........

Member Avatar for rajenpandit
0
132
Member Avatar for xyzt

Hello, I have lots of xml files in the same format and I need to modify a xml tag in these files. i loop over the files and apply sed to the files to make the modification but CPU goes to %100 while doing this. I think I'm doing something …

Member Avatar for fpmurphy
0
408
Member Avatar for ViLeNT

I'd like to write a script to identify current users on the sytem with an indication of the actions they are performing. I only want to identify the users. Can someone please help?

Member Avatar for ermithun
0
98
Member Avatar for edojan

hello I basically need to automate this [url]http://www.contextmagic.com/express-clickyes/[/url] with shell script. how can i tell inside shell script to find and activate window and then sendkey {tab} tab enter .... Thanks!

Member Avatar for sknake
0
68
Member Avatar for Kerry_suds

This is the question, first I'd like to know if shell scripting could do this, if it can whats the best scripting language to use and any hints you can too. TIA. The problem I have is this I need to do a lot of search and replaces. But they …

Member Avatar for Ancient Dragon
0
117
Member Avatar for mvksudheerkumar

Hi guys, i want how to run the batch file for particular time interval in windows thanks

Member Avatar for Salem
0
67
Member Avatar for leoman

have written a shell script in which I use fastmail to send emails from the shell script. It sends email to my company account with no problem. But I wan to send the same email to a pager number so that the pager goes off when the particular condition occurs. …

Member Avatar for KlementHonza
0
2K
Member Avatar for lanepds

I have defined a variable in bash [code]$ MYDATESTAMP="2009-06-25 21:57:18"[/code] I would like to pass this to perl to perform a simple date conversion. If I enter the date manually it works. [code]$ perl -MDate::Parse -le'print str2time("2009-06-25 21:57:18");' $ 1245992238[/code] My attempts to pass the variable MYDATESTAMP into this command …

Member Avatar for lanepds
0
937
Member Avatar for chrissi

Hi, I had some irritation with a "while"- loop, which turned out to be endless. Anyway, i was able to find the problem and reduce it to be shown on the commandline: I "typeset" (and initialize) an array and an integer variable: [CODE]$ typeset -a arr; arr=(bourne again shell) $ …

Member Avatar for atucsprof
0
149
Member Avatar for grvs

Hi I am new to unix and want to learn shell scripting. Right now I am use cygwin for windows but sooner I will switch to ubantu. So when I wrote my first script (just copied from the book I was reading), I came to know I have to give …

Member Avatar for grvs
0
2K
Member Avatar for kaleidoscope

Hey, I wanted to create a Body Mass Index calculator. I've already created a seperate HTML file with a form where you have to type in your weight and height. So far so good, now I want to 'transfer' the data to my cgi script (unix shell script) as soon …

Member Avatar for msvinaykumar
0
1K
Member Avatar for giftalp

I need write simple script,but I just started and don't know how to do this at all. And I need it before tomorrow. This is what I need. 1) Create a directory FileData and place four files into the directory. This part, I already did, but second still exist. 2) …

Member Avatar for msvinaykumar
0
99
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
166
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
152
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
141
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
112
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
365
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
110
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
89
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
121
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
153
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
180
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
122
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
95
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
88
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
111
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
95
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
73
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
108

The End.