1,891 Topics

Member Avatar for
Member Avatar for rman10

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 …

Member Avatar for eggi
0
164
Member Avatar for chris5126

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 …

Member Avatar for Fest3er
0
2K
Member Avatar for Blackeagle

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?

Member Avatar for Comatose
0
96
Member Avatar for snahata

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 …

Member Avatar for ghostdog74
0
393
Member Avatar for brakeb

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 …

Member Avatar for brakeb
0
376
Member Avatar for ImSorry123

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

Member Avatar for masijade
0
64
Member Avatar for chadactive

I want to know if there are any good beginner books that cover everything about windows scripting. Please suggest.

Member Avatar for siul0_0
0
70
Member Avatar for lehe

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

Member Avatar for eggi
0
163
Member Avatar for rhesus303

[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

Member Avatar for Fest3er
0
75
Member Avatar for rEhSi_123

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 …

Member Avatar for Fest3er
0
173
Member Avatar for kamel.kimo

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 …

0
50
Member Avatar for jimjim56

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 …

Member Avatar for radoulov
0
92
Member Avatar for egmik3

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

Member Avatar for eggi
0
137
Member Avatar for JimD C++ Newb

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

Member Avatar for eggi
0
388
Member Avatar for k2k

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 …

Member Avatar for eggi
0
142
Member Avatar for chadactive

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?

Member Avatar for chadactive
0
187
Member Avatar for chris5126

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 …

Member Avatar for chris5126
0
161
Member Avatar for lehe

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 …

0
95
Member Avatar for lehe

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 …

Member Avatar for lehe
0
93
Member Avatar for oguru

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 …

Member Avatar for oguru
0
62
Member Avatar for Pender

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 …

Member Avatar for Pender
0
85
Member Avatar for progurammaar

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.

Member Avatar for progurammaar
0
99
Member Avatar for chris5126

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 …

Member Avatar for chris5126
0
115
Member Avatar for gornhorse

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 …

Member Avatar for eggi
0
150
Member Avatar for k2k

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

Member Avatar for ddanbe
0
138
Member Avatar for eapln

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 …

Member Avatar for eapln
0
111
Member Avatar for premdeeprem

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

Member Avatar for premdeeprem
0
100
Member Avatar for madurai07

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

Member Avatar for eggi
0
154
Member Avatar for glamiss

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 …

Member Avatar for eggi
0
141
Member Avatar for number87

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

Member Avatar for Salem
0
148

The End.