1,891 Topics

Member Avatar for
Member Avatar for mooglor

[code] #!/bin/bash ARCHIVE_PATH=/archive CURRENT_DATE='date +%F%H%M%S' echo running at `date` >>~/Logs.txt for FolderToSearch in $(ls -l /home/stuff/tp |grep ^d|awk '{print $9}'); do find /home/stuff/tp/$FolderToSearch/in -name '*.*'|awk '{print "zip -m " $ARCHIVE_PATH "_" $FolderToSearch "zip2arc.zip" $CURRENT_DATE;}'|bash|tee -a ~/Logs.txt; done [/code] Hi there, I'd appreciate it if anyone can tell me how to …

Member Avatar for ghostdog74
0
127
Member Avatar for hschitte

How can i get the OS name and its version in linux shell script Is there any command to extract OS details from linux shell script.

Member Avatar for jbennet
0
41
Member Avatar for Raghavansat

Hi I want to write a script file that first executes a command [code] /usr/sbin/alternatives --config java [/code] which asks to enter a number.... i want to give this input automatically by the script... i dont want human intervention....how can i do this.....

Member Avatar for eggi
0
90
Member Avatar for Raghavansat

Hi I am new to scripting.... i want to write a simple script file that executes the following command `java -version`.... i have to read the output given by this command inside my script.... [code] var_name=`java -version` echo $var_name [/code] just displays java -version i want the output of java …

Member Avatar for eggi
0
109
Member Avatar for tomok

Hi guys, Couldn't find a suitable forum for this question, please move this thread if needed. What I need to do redirect the output of TOP to a text file. Doing a simple %> top > top.txt yields the following %> less top.txt load averages: 0.88, 0.89, 0.87 11:50:49 100 …

Member Avatar for masijade
0
86
Member Avatar for maciac

I'm having real trouble getting my script to work, it's about 3 pages long and I'm having trouble with one of my if...then constructs. The code for the sub is as follows: [CODE]check_a_b () { CHECKA="634274" CHECKB="512274" if [ CHECKA=CHECKB ]; then echo "Match" echo "$CHECKA" >> "$LOGFILE" echo "$CHECKB" …

Member Avatar for eggi
0
102
Member Avatar for pdwivedi

[COLOR="Red"]We have a plant in which all the activities are recorded in a log file. We have to make an application which retrieves data from the log file,like history of a product which is passed from various work stations. we want to make an application which takes selected data from …

0
61
Member Avatar for ahjiefreak

Hi, I have multiple text files (.txt) which is a table like input:- Column1 Column2 Column3 Column4 1 5 10 15 5 10 20 40 .......... This is just one of the .txt files and I want to insert these txt files into separate worksheets in excel workbook. Any idea …

Member Avatar for eggi
0
273
Member Avatar for skelly16

Hi All Im having issues with my mail command sending data from my script. I have a korn shell script which logs onto a database and does a few select statements. The problem is i think the EOF stops my mail command sending the data. Im able to run the …

Member Avatar for eggi
0
774
Member Avatar for ahjiefreak

Hi, I have the following file input:- [CODE] 542 4795 61 543 4795 61 544 0 0 545 292 2 546 292 2 547 0 0 548 0 0 549 0 0 550 111 4 551 0 0 552 0 0 553 4614 63 554 4614 63 555 0 0 …

Member Avatar for eggi
0
149
Member Avatar for dd_sh

Hi Guys, I need a help. I am pretty new to the shell level programing. I was trying to split a long lines to a multiple lines with few conditions. I goggle for the code and found some snippets and tried to modified it but I got few strange problems …

Member Avatar for blater
0
81
Member Avatar for baku

using sed print the lines that have more than 10 characters, of each file. the files arre given as parameters. i did this: #!/bin/sh a=0 zece=10 if [ $# -eq 0 ] then echo "An error occured regarding the parameters. " else for i in $@ do if [ ! …

Member Avatar for baku
0
56
Member Avatar for seemit

Hi, I want to append each line in a file with string "foo foo" if number of charcters in the line are 4000. There can be n number of lines and this scenario applies to all lines. .. any takes? i want shell to do it. -Seemit

Member Avatar for seemit
0
94
Member Avatar for larryperl

Hi, I have two files-- file1- Quote: dn: cn=Anandmohan Singh,ou=addressbook,dc=thbs,dc=com objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson cn: Anandmohan Singh givenName: Anandmohan mail: [email]anand_ms@thbs.com[/email] mobile: 9986010455 ou: null physicalDeliveryOfficeName: ST-6th Floor sn: Singh telephoneNumber: 41827200 Extn: 7400 title: Associate Software Engineer - Trainee uid: 1432 dn: cn=Riteshkumar Mohanty,ou=addressbook,dc=thbs,dc=com objectClass: …

Member Avatar for larryperl
0
86
Member Avatar for dilkash2007

hi, i'm a very new in unix, can u help me how would i start to read sell programming. can u suggest me some name of tutorials thanks

Member Avatar for DimaYasny
0
47
Member Avatar for cnet1989

I want to write a shell script that finds files in a directory that are (owner permissions) readable, writeable, or executable for the owner. But I don't know the command to list files with certain permissions (rwx)... I'm sure it has something to do with ls, but I just can't …

Member Avatar for dilkash2007
0
60
Member Avatar for ashikin_8119

Hi all; I'm having headache on append one line to another based on the fix position.Hope u guys can help. All i need to do is append the line that start with '3' to a line which start with '1' and the position for line 3 that i need to …

Member Avatar for ashikin_8119
0
58
Member Avatar for chrchcol

I am trying to write a command line bash script that will allow you to send mail to an email address using some variables. The email is a signup form with username and passwords. The subject line and most of the body will be hard coded. The script should ask …

Member Avatar for riotxix
0
209
Member Avatar for tomok

Hi guys, After trawling through the forums and interweb, hopefully someone here can offer me some help with sed! I have a csv file that contains records. Each field is delimited by a comma, and each row is delimited by a \n. However, in some cases, I need to remove …

Member Avatar for eggi
0
117
Member Avatar for bungley007

hey I need a script to set a display to users ip's, I just need help putting it togther the command i need to run is setenv DISPLAY ipaddress:0.0 And i've got this to grab the ip and pop in the :0.0: who|grep user | awk '{print $6}' |sed 's/(//g' …

Member Avatar for eggi
0
81
Member Avatar for php.mca

Can any one tell me how to convert any types of file to pdf? I want a shell script or a software in opensource? is there any software that can do this? Please help me. I would be very much thankfull to u. thanx in advance Dushyant Joshi

Member Avatar for TheOgre
0
1K
Member Avatar for techbrain55

hello there I am new into scripting . What is the use of unix shell scripting with oracle and how can I combine oracle with unix shell scripting? Any replies regarding this would be great. Thanks in advance, Techbrain55

Member Avatar for chris5126
0
58
Member Avatar for virendra maloo

Hi, I am trying to call a certain command from within a shell script, but everytime it executes the script, only the first command runs and it comes out of the control, how do i do it? code : ```````` #!/bin/sh # # #i=1 #while [ $i -le 3 ] …

Member Avatar for eggi
0
68
Member Avatar for cdfd1982

A file is ELL[COLOR="Red"]P[/COLOR][COLOR="Red"]S[/COLOR]YST[COLOR="Red"]A[/COLOR]TL ELL[COLOR="Red"]S[/COLOR][COLOR="Red"]U[/COLOR]YST[COLOR="Red"]L[/COLOR]TL * * *[COLOR="Green"] : . [/COLOR]* * *[COLOR="Green"] :[/COLOR]* * H[COLOR="Red"]H[/COLOR]ULJKL[COLOR="Red"]O[/COLOR][COLOR="Red"]P[/COLOR]OA H[COLOR="Red"]P[/COLOR]ULJKL[COLOR="Red"]P[/COLOR][COLOR="Red"]O[/COLOR]OA * [COLOR="Green"].[/COLOR] * * * * *[COLOR="Green"] : : [/COLOR]* * and it is a long file ..... so output shud be where there is[COLOR="Green"] : [/COLOR]and [COLOR="Green"].[/COLOR] counting start from E and …

Member Avatar for rikxik
0
139
Member Avatar for learnbash

Hi Folks I need help about a script. Here are the detail of of Script. I have total 3 files which have following records. 1. file1 -> contains all userids 2. file2 -> random userids, some are present and some are not. 3. file3 -> ls /home file, whever directories …

Member Avatar for eggi
0
134
Member Avatar for cyberdyne

hi frnds, I need a batch program that can reboot every time a system starts.It should work in NT systems too.

Member Avatar for chris5126
0
124
Member Avatar for girish.batra

Dear all I am still bit new in shell script area.I am writing down a shell script which I guess somewhere wrong so please kindly correct it. I would be greatful for that. What I actually want from this shell script is that it will move all the files one …

Member Avatar for girish.batra
0
113
Member Avatar for joikirk

Hi. I created 100 dummy mp3s, and I used the id3tool to change the tags on them. Each mp3 is named some number with the extension of mp3 appended to it (ex: 20.mp3). When I click on the file, the tags that I changed appear. What I'm trying to do …

Member Avatar for joikirk
0
99
Member Avatar for Imti

To implement a very primitive shell (a Toy Shell) that knows how to launch new programs in the foreground and the background. It should also recognize a few internal commands. More specifically, it should support the following features. It should recognize two internal commands: exit and cd. exit should use …

Member Avatar for eggi
0
79
Member Avatar for Ole Raptor

I am attempting to write a script that will add a user to the system. I am using fedora 5 and am attempting to use the useradd: command but i receive "command not found" I am also trying to get the current users from the system so i can check …

Member Avatar for Ole Raptor
0
108

The End.