1,891 Topics

Member Avatar for
Member Avatar for TheWhite

"ps aux" outputs the following as the first line: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND how can I preserve this line if I do a "ps aux | grep <someuser>" so that I can still see the header for each column? In essence, I want …

Member Avatar for thekashyap
0
114
Member Avatar for vasuv

Hi , I have a excel sheet.in that one column called hardcoded. we have sheet as folllows. Name EMp_ID Hardcoded ---------------------------- ABC 1987870 1. EMP_SAL_CD : "2000","1300","Avg100" 2. DEPT_CD : "Manager","clerk","anlyst" 3. DNAME : "SALES","HR" STU 1909890 1.EMP_SAL_CD : "6000","300","A100" 2. DEPT_CD : "Manr","cle","ant" 3. DNAME : "SALES","HR","STUD" --- --- …

Member Avatar for thekashyap
0
94
Member Avatar for luke710

hey guys ive been working on this script for this game for like 3 weeks now i just cant get it can someone plz fix this for me its not to far off SetActiveWindow Naruto New Flames 2.8 constants k1 = 0 uparrow = 1 leftarrow = 2 rightarrow = …

Member Avatar for thekashyap
0
149
Member Avatar for trume

Hello, How can I do it on a recursive way? (Function ''plus'' needs to call itself) [CODE]#!/bin/bash function plus { let GLOBAL=$GLOBAL+$1 } GLOBAL=0 n=$1 for ((i=1; i<=n; i++)) do plus $i done echo Answer: $GLOBAL[/CODE] Any help is welcome! Regards, trume

Member Avatar for griswolf
0
87
Member Avatar for Pandamonium

Hi, I am trying to get my sorting script to work, and add to it. Here is my code so far: [CODE]#/bin/sh echo "Name Exam1 Exam2 Exam3 Total Grade" > final.txt awk -f 9.awk grades.txt | sort +4 -5 >> final.txt[/CODE] and then 9.awk is: [CODE]#BEGIN {printf "Name\tExam1\tExam2\tExam3\tTotal\tGrade";} { if($2+$3+$4>90) …

Member Avatar for shibblez
0
172
Member Avatar for manish250

Hello all I am running a shell script.What a need is i want to set a timer which show how much time is elapsed and how much time is left for completing the script. can it possible in Linux shell scripting.

Member Avatar for griswolf
0
203
Member Avatar for kristo5747

Greetings. I am using SED to cleanup files that are laid out like so: [icode] ReceiverID=028936004663 SerialNumber=WD-WCAV95708405 Currenttemp=44C PowerOnHours=3663h ReceiverID=028923894902 SerialNumber=WD-WCAV9A766701 Currenttemp=49C PowerOnHours=2215h [/icode] My boss wants files like this one to be tab ("\t") delimited like so [icode] ReceiverID=...(tab)SerialNumber=...(tab)Currenttemp=...(tab)PowerOnHours=...(newline) ReceiverID=...(tab)SerialNumber=...(tab)Currenttemp=...(tab)PowerOnHours=...(newline)... [/icode] 1) first, I added a newline to mark …

Member Avatar for kristo5747
0
159
Member Avatar for bufospro

Hi all, I am new in shell scripting and I need your help 1. I would like to make a list of files (no folders) of unix system which do not belong to root 2. I would like to make a list with directories of system which the first letter …

Member Avatar for bufospro
0
147
Member Avatar for trume

Hi! I'm new in shell scripting, so please help me with my problem. How can I do a bash script's [B]for loop[/B] to find the smallest number? If I have an example: 1 4 6 23 5 7 100 2 Answer: 1 It needs to be a for loop. Any …

Member Avatar for Potion
0
185
Member Avatar for sidlampard

This is an assignment question, I know i should do it myself, but believe me i have just learned this subject and couldn't find the answer. Please if someone could give me the answer, i would be greatfull. And please if you could hurry because I have to submit on …

Member Avatar for Potion
0
107
Member Avatar for gmdune

Hi All, I have a list of txt files that I need to grep out for specific content and then create individual based on the txt file name. Here's my situation: I have been given a list of txt files, for example file is named cp205.txt, and I want to …

0
78
Member Avatar for khattak24

how to write a bash shell script called which outputs the calendar for the current month and the following month?

Member Avatar for masijade
0
43
Member Avatar for tig2810

Hi all, I have a problem I always though i knew the answer to. I have a variable with spaces and I want to perform an operation on each. VAR="THIS" "THAT" "THIS AND THAT" "THIS AND THIS" for i in $VAR do echo "$i" done I thought that I should …

Member Avatar for cfajohnson
0
144
Member Avatar for deepakkrish

Hi, for i in 84 85 86 87 88 89 90 91 92; do ./runCleanup Session 11${i}; done i tried as we do in perl like for i in 84..92; do ./runCleanup Session 11${i}; done But its showing error. what is the solution. Thanks, Deepak

Member Avatar for masijade
0
110
Member Avatar for oozypal

Hello, I have a CSV file like: 01,xyz 02,mux 03,mysite 04,mycarsite 05,etcweb I would like to write a cood the read this csv file and replace the password of the account as such to have formula that contains the numbers above. For example 01,xyz->mypassword01pad 02,mux->mypassword02pad 03,mysite->mypassword03pad 04,mycarsite->mypassword04pad 05,etcweb->mypassword05pad Thank you

Member Avatar for oozypal
0
105
Member Avatar for modesto916

Hi everybody, I decided to ask it here because i didn't know how to ask it on google, i want to know what does this line do: : ${dummy_msg:="Nothing started."} Thanks.

Member Avatar for modesto916
0
276
Member Avatar for lkrvk

guys i have a serious problem my cmd is not under my control as a virus has taken the power. now i want to format my entire drives completely with some .bat file. i am unable to do it with windows disk coz the virus is very talented to come …

Member Avatar for lkrvk
0
240
Member Avatar for lids05

I am a novice, so please don't be too technical ! I have written 3 separate scripts which all work OK. I now need to merge them into one big script. I would like to introduce a runtime parameter, to allow me to restart at script2 or script3. I would …

Member Avatar for lids05
0
80
Member Avatar for fatalaccidents

Hey guys, So I have a file with a bunch of information with the first line being the julian date. I'm wanting to copy all of the information of the julian date (which there are 288 lines per julian date from readings every fifteen minutes) and copy them and add …

0
62
Member Avatar for Josue198s

hi guys please help writing this shell script in C..please count2:[code] #! /bin/sh # count2 also increments and appends a value to the numbers file # but only when it can successfully create a new hard link to the numbers file count=0 while [ $count -lt 200 ] # still …

Member Avatar for griswolf
-1
221
Member Avatar for captor

Hi All, I have a problem. I need to write a shell script to change the password. The user may want to change his own password by this script. He will have to provide the required 3 parameters i.e. old password, new password and retype new password as arguments in …

Member Avatar for milanshentu
0
2K
Member Avatar for Dec28

Not sure why my comparisons aren't working between my input (text) and my several char arrays. I'm trying to get the user's input to terminate certain functions as you'll see below. I realise it's not the most efficient code but if there's anything obvious I'm missing please let me know. …

Member Avatar for Narue
0
209
Member Avatar for dark3lf

Hello, I have a script written the unix shell language (NOT in bash or any other shell, in sh) that prints the mount point of a given usb (i.e, it takes the path of a usb (such as /dev/sdb1) as an argument). Here it is: [CODE] #!/bin/sh # usage: get_mount …

Member Avatar for thekashyap
0
198
Member Avatar for akhtar_mnnit

Hi All, I have no background in scripting in any of the languages.I am trying to write one awk script which can actually read a csv file and stable sort each column and return the output in pivoted form. So, for the sample csv file below: Akhtar,MNNIT,INDIA Azhar,LU,PAKISTAN Bob,MIT,USA Raj,Purdue,INDIA …

Member Avatar for thekashyap
0
165
Member Avatar for kanthmca3

Could you please help me, i need to extract the fields which are Highlighted and moreover i want to extract in the following way. starting from the first column i have to go n(say n=13) lines down and extract "Records" field value. [U]P.s[/U] Please find the attached document which clearly …

Member Avatar for thekashyap
0
89
Member Avatar for moraks007

To Chubler XL #!/bin/sh touch fileuseranswer echo "**********WELCOME TO GROUCHO MARX UNIVERSITY**********" echo Username: read i echo Password: read j Username="${i}:{j}" if ( ! grep -q $Username /$HOME/PhaseTest/userinfo ) then echo "Wrong Login/Passwd" exit 2 fi echo echo -e " \c" date QFILE=./questions # max questions max=$(sed 's/^[1-8][0-8]*\. /#&/' ${QFILE} …

Member Avatar for thekashyap
0
162
Member Avatar for Dongalor

Hello, I've a script that is launched with a soft link. Inside the script, I need to know where is the script, and I'm using the following : [CODE]SH_DIR = $(cd $(dirname "$0"); pwd)[/CODE] But SH_DIR contains the path of the soft link i.e, I've the soft link like this …

Member Avatar for griswolf
0
237
Member Avatar for klegrand

I want to change to setting 'Deny access to this computer from the network'. This is under Local Security Settings. I need to remove the guest account from the list. Is this setting stored in the registry and can it be modified with VB script ? Thx, kurt

Member Avatar for klegrand
0
55
Member Avatar for whizkidash

Team, Could you let me know what the below function does which is part of my actual script.. Yeah as per my understanding it checks whether the TAR file has been completed or not.. but what is the 1; does below is it end of line or something other.. CheckRetStat …

Member Avatar for thekashyap
0
125
Member Avatar for ebbtide

Hello, I need assistance with a pearl/expect script to change user password on mulitple UNIX/Linux servers. I have one dated 11/16/2006 but it is not working exactly as expected. Was hoping there was an updated version that might assist me? It works as such: passchange.script -cmd "passwd user" -inputfile file_with_listofhosts …

Member Avatar for thekashyap
0
192

The End.