1,891 Topics
| |
Hello! I am a newbie to scripting and I'm trying to start an application via a bash script after checking to make sure that two condititions do (or do not) exist first. I've attempted to write down what I'd like to do and was hoping someone could point me in … | |
Hi I have a command that produces the following: [code] /usr/ucb/ps -auxxx|awk '{print $3,$4,$2,$1,$11}'|grep -v 0.0 %CPU %MEM PID USER COMMAND 0.2 5.217405286920 1910 noaccess 0.1 0.1 180 root 0:43 0.1 0.1 686 root 0:41 0.1 0.1 26198 chris /usr/lib/ssh/sshd 0.1 0.1 26767 root /usr/ucb/ps 0.1 0.1 26215 root bash … | |
hey, i've just learnt how to make additional virtual console ( e.g pressing ctrl+alt+f8 ) by changing the /etc/inittab file. i was wondering if i can make another graphical one such as that on ctrl+alt+f7 ?? can i do that from /etc/inittab or its not possible to make it there? | |
Hi, I would like to add a new column in a text file which contains values based on the value of another column. Eg: suppose the text file contains: 1 abc 67 2 def 40 3 uty 57 ....... .... Now i would like to add a new column which … | |
| Greetings, I have reached a point where I need some help. I have a tivo at home, and I'm trying to script something that will allow me to 1.) pull the XML off of the tivo, and save the file, 2.) Take the text in the XML, and pull out … |
Hi All, I am not familiar with shell script and not really have much experience. How to produce a Unix shell script that will display a welcoming message to the current username. Next, the script will show the current directory path, and the extended information of the current directory contents. … | |
I want to know if there are any good beginner books that cover everything about windows scripting. Please suggest. | |
Hi, These days I have to install a higher version of bash under my $HOME on my office server. I hope to make the new bash automatically run both when I ssh to my server and when I boot into my office computer which loads my $HOME on the server. … | |
[code] if ! [ -t 0 ] ; then read var fi [/code] I know what the result will be but don't understand the conditional test. I've never seen it before nor can I find the -t option in any shell scripting tutorial | |
Hello, I am trying to write a shell script which will have the following: 1. arguments like: -h, -- help, -v, --version, -V, --Verbose, -o filename, --output=filename -s searchphrase, --search=searchphrase, -f format, --format=format 2. a default usage where a user runs a search phrase where the output should go to … | |
Hi every body, i have this file example : TD1 TD2 TD3 . . .TDn <DIE_1> xxxxxx <\DIE_1> <TD1> information 1 inormation n <\TD1> <TDq> information <\TD_q> . . . <DIE_m> xxxxxx <\DIE_m> <TD3> information 1 inormation n <\TD3> <TDP> information <\TD_p> for example i can find TD3 in DIE_n … | |
Hey all, I am trying to write a shell script that evaluates the size of each user's home directory and if it is greater than 50 MB I want an email to be sent to their user account telling them that they need to reduce the size of their home … | |
Does anyone know of a simple command that could get the date and make a folder (mkdir) as its name? say todays date 20090304 as the folder name. I guess the first thing would be grep the date? Then run a mkdir command? Any help is appreciated! Thanks | |
Good afternoon all! I am writing an address book for a class that I have, and am stuck on this last part. Any help would be greatly appreciated! When the user selects the "Edit existing record" option, I can't figure out how to make the file overwrite the previous record. … | |
hi, i am trying to write a script to add 100 users and with certain things created. however, all the book and tutorials online recommend and only show the way to use passwd user after creating a user by useradd username. i know there is a -p option for the … | |
I plan to start learning shell scripting but I want to start with the one I can use. Is there anyway to find out which type and version of shell program XP uses? Is it DOS, PowerShell? | |
Hi, I am writing a script to get information on disks for Solaris 10, does anyone know of a way to print out the size of each disk on the system in MB i know how to get it in GB and could do some number manipulation however it would … | |
Hi, I am beginning to use bashdb to debug my shell script. Here are my questions: 1. With "bash --debugger ./myscript.sh" it will run to finish without stop, while with "bashdb ./myscript.sh" would stop at the beginning. How could I stop in the first usage? 2. I am using Bashdb … | |
Hi, I am trying to debug my shell script by bashdb. My script take as argument "--gdb", so I wrote [quote]bashdb myscript.sh --gdb[/quote] However, this way it will produce error that bashdb: [quote]unrecognized option '--gdb'[/quote] If I quote --gdb as [quote] bashdb myscript.sh '--gdb'[/quote] then I will end up with … | |
Hi Guys! I would like to create a shell script that checks how many files there are in a directory. If there are more than 20 then delete the ones that are older than 48 hours old. so I have portions for a script, but I can't seem to make … | |
hi all, i have a problem with a sqlplus (v8) statement that queries several tables and writes the output into a csv file. that works so far, but one of the tables is a encrypted user password. the problem is that the encrypted characters can also include control characters like … | |
Hi i'm planning to create a music player for linux. I actually dont knw if shell script allows you to create one. Please let me know what programming languages do i need to know to develop one. | |
HI guys, I have file with 6 values in: [code] 1060276 2211546 7544.941158316 1060276 2211606 7545.960677177 [/code] I put those numbers into variables: [code] obyte1=`cat $TMP | sed -n 1p` rbyte1=`cat $TMP | sed -n 2p` snapt1=`cat $TMP | sed -n 3p` obyte2=`cat $TMP | sed -n 4p` rbyte2=`cat $TMP … | |
Hi, I have two shell scripts that do the same thing, but are written differently. The first one works: [code] size=0 pattern=foo for file in * do [ ! -f $file ] && continue if grep $pattern $file > /dev/null then tsize=`cat $file |wc -c` size=`expr $size + $tsize` echo … | |
hi, basically i need to find out how many lines are in a file. would someone please refer me a quick command? i don't think wc would work since i need the line number. thanks | |
i am trying to move to the dest_dir from Current Working Directory using the following script. my intension is instead of using cd dest_dir, i have to use the script to do the job. when ever i tried with the follwing script, iam again in my Current working directoy... #!/usr/bin/bash … | |
'*'********************************************************************************* ' ' ' Name : SP Management Utlility ' Author : Prem Dhanendran ' '********************************************************************************* [code] 'Create an instance of the File System object dim objfile, navfile set objfile = Createobject("Scripting.FileSystemObject") if isobject(objfile) then set navfile = objfile.opentextfile("L:\OTAI\Package\sp.txt") end if 'Read the Config file sp.txt on L: Drive line … | |
[code] #!/bin/bash # Days and Procs declaration DAYS="3" PROCS="dyyno" # 3 days Old date AGO=$(date --date="$DAYS days ago" +"%b %d") # Getting pids PIDS=$(ps eaxo bsdstart,cmd,pid | egrep "^$AGO"' | egrep "$PROCS" | awk '{ print $4}') # killing the processes echo "Killing $PROCS process created $AGO days ago" kill … | |
i have a couple of servers that are changing perms on /dev/null so that "other" can't access it, at random (well, i'm sure SOMETHING'S causing it, but the timing is random), so i wrote a script to go in the inittab so it'll respawn if it dies (bash shell) the … | |
#5report function report { clear echo "Name, Position, Department, Salary" echo "========================================" awk 'BEGIN{FS=","; RS="\n"} {printf "%s, %s, %s, %s\n", $1, $2, $3, $4}' $dataFile awk '{total += $4}END{print total}' $dataFile } i am trying to print the total sum of the salary or $4 field. However i cant figure … |
The End.