1,891 Topics

Member Avatar for
Member Avatar for Variable86

Hi,I have a problem with this exercise compress all the directories that don't contain at least one file used in the last 15 days , with the same name of the directory thank you

0
61
Member Avatar for itengineer7

hi, how can i pervent from crontab concurrent run ??? thats mean when my crontab Take too long , with this crontab another crontab not runs... please help me ...

Member Avatar for L7Sqr
0
147
Member Avatar for pennywise134

Hey guys, I'm trying to create another shell script that does the following, but I am not sure where to start. Any help would be greatly appreciated! •Reads student name, address, city, and email and phone number from the keyboard with meaningful headings for each of them on separate lines. …

Member Avatar for JeoSaurus
0
97
Member Avatar for bossman5000

Write a shell script that will accept any number of command line interger parameters a d do the following....I have to use a if statment for the lowest and highest values??? Determind the lowest and highest values? Determind the sum of all parameters entered?

Member Avatar for bossman5000
0
202
Member Avatar for pfm200586

hello every one I have a problem that drove me crazy last couple days I know I have to use loop structures but I can't figure out how to put the right pieces together. I'm not asking for a complete answer because I want to learn so please help me …

Member Avatar for L7Sqr
0
917
Member Avatar for pennywise134

Hey guys, I am trying to write a shell script that does the following: •Display the user a prompt to enter his name •Read the name •Display the user a prompt to enter his age •Read the age •Display the message as “Hello, your name is …… and your age …

Member Avatar for nikita.
0
103
Member Avatar for Triarmsponors
Member Avatar for bossman5000

write a Unix shellscripthat will take the information from two files and combine into another file I created both files in vi and they are file1 David 734.854.5643 Roberto 313.432.4532 Sally 267.423.5412 Mary 435.432.7654 Ted 324.642.6743 Alice 234.576.3245 Frank 342.465.6754 and the second file is file2 Roberto Tuesday 2 Sally …

Member Avatar for L7Sqr
0
215
Member Avatar for Awais Ali

hy guyz, I want to create a windows 'shell'(CLI based) in C++ (like Windows cmd) which has ability to Create folder or file, copy and paste and delete folders or files... So plz help me and tell me the which libraries will use because i have no idea about this. …

Member Avatar for thines01
0
67
Member Avatar for pfm200586

Hello everyone, I have this little for loop that I want to convert to a while loop. It accepts unknown number from the command line parameters and then add them all up and display the sum, here is the for loop: [CODE]sum=0 for x in $* do sum=`expr $sum + …

Member Avatar for L7Sqr
0
94
Member Avatar for Knome

I'm trying to call a function from an if statement that is inside a for loop. I need to send the $i in "for i in *" to a function but i can find nothing that works. ex. [code] # Perform actual file grab for i in /Users/* ; do …

Member Avatar for L7Sqr
0
185
Member Avatar for manpreet87

Hi, i am working on a script that will filter out the unique trace of error logs from a log file. The log file might contain different types of exception traces(like Null Pointer Exception, Illegal Argument Exception etc.) and i want to retrieve each such exception trace and also count …

Member Avatar for manpreet87
0
215
Member Avatar for nikita.

what is the use of [code]unix-stream("path/to/file");[/code] I can't seem to find it anywhere.

Member Avatar for L7Sqr
0
104
Member Avatar for RohitSahni

mY QUERY IS RELATED TO.. How can i set coloumn width in unix... Like for ex. i am having a file, whose content is like ------------------------------ aba bba baba abba baba baaa addd ffff fffff ----------------------------------- i want it to be like ----------------------------------- aba bba baba abba baba baaa addd …

Member Avatar for L7Sqr
0
2K
Member Avatar for nikita.

Hi , I want to run a shell script which is present in another user's id after switching it to that user in the same script. but it is not taking it. I m using the su command for that. [code] su - user1 -c "./${HOME}/script1.sh" [/code] it just says …

Member Avatar for nikita.
0
172
Member Avatar for Gyani.gtst

i am having problem in suppressing the output to display on the screen. below the output that i am getting. hfdkjd...OK hadfhkj...OK code : #!/bin/bash ASMM/bin/xacct test -i i have also tried by redirecting into the file, but to no avail. plz help me with this

Member Avatar for L7Sqr
0
95
Member Avatar for iamthesgt

This is homework. I was writing a bash script that accepts a list of group names on the command line and produces a group report detailing the group id and the number of group members identified in /etc/passwd for each group. Output will look like: Group Report Group GID Count …

Member Avatar for iamthesgt
0
307
Member Avatar for nikita.

I have finally written this code, but the prob with this is that when it is prompting for password it doesnt send any password to the ftp machine, we have to do it manually, but after typing it manually, it take the password line as command and shows that that …

Member Avatar for nikita.
0
208
Member Avatar for nikita.

Hi I have written the below code for ftp transfer. can u please help me how to trap whether it is successful or not. [code]ftp -n `awk '$1 ~ /db_server_IP/ { print $3 }' $CONFIG_FILE` <<END quote USER `awk '$1 ~ /db_user/ { print $3 }' $CONFIG_FILE` quote PASS `awk …

0
150
Member Avatar for Gyani.gtst

i am getting output as XYZ... ABC... This is \t\t\033[40m\033[32mUP\033[0m instead of XYZ... ABC... This is UP i am trying to diplay "UP" in green colour. below is the code: #!/bin/bash var=` /export/home/GT/AM/bin/xacct test -i | grep OK | wc -l` if [[ var -eq 2 ]]; then echo "This …

Member Avatar for Gyani.gtst
0
222
Member Avatar for SakuraPink

Hi everyone, I am trying to change hundreds of data files using sed command. Text file1 have 10 lines which look like the following [QUOTE]{ x=34280; y...} { x=34281; y...} { x=34282; y...} { x=34283; y...} { x=34284; y...} { x=34285; y...} { x=34286; y...} { x=34287; y...} { x=34288; …

Member Avatar for SakuraPink
0
147
Member Avatar for mkab

Hello everyone. I'm trying to code the cd shell command in c. I used chdir function to code it but the problem is that when I execute the program on the terminal it doesn't change the directory. I kept a series printfs and conditions to test if it changes, though …

Member Avatar for mkab
0
6K
Member Avatar for nikita.

I want to write a shell script to automate the ftp session, in that it should take the inputs like the server ip , username , password from a different file who path i'll pass. and also the validations that if the server path exits or not.

Member Avatar for nikita.
0
207
Member Avatar for nikita.

I have to run a shell script and store whatever is performed in it into a log file. the path can be altered for the log file. how can i do that ?

Member Avatar for nikita.
0
4K
Member Avatar for Prakash_8111

Hi Guys, how to call one shell script from another script inside a loop ? any suggestion most welcome. Prakash

Member Avatar for nikita.
0
3K
Member Avatar for SCass2010

Hi everyone, I'm trying to write a script that will list all files and their details within a directory - so for example, if I have the structure /home/ /home/folder1/ /home/folder2/ /home/folder3/ It will print something like +---------------------------- | /home/folder1/ +---------------------------- | *files here* | *size* +---------------------------- | /home/folder2 +---------------------------- …

Member Avatar for griswolf
0
119
Member Avatar for LMHmedchem

I have an unusual situation where I had a hard drive with some bad sectors and moved the data to a new drive. I did the move with cp -Rfp and >& logfile. I moved the data (~285GB) with about 20 copy commands. The >& should have given me information …

Member Avatar for L7Sqr
0
166
Member Avatar for FALL3N

Hello. I am writing a script to do some copying of files. I feel confident that I can do that part, but before I even start doing the actual copies, it compares the last modified dates of two files.. I know this seems a very basic question that I would …

Member Avatar for FALL3N
0
207
Member Avatar for sarita_1

I am very new in Sugarcrm. I want to send Email in some intervals to all my contacts that I had added in my Sugarcrm account. Is there any facility for the same? If yes then how can I implement it? I want that I will be able to use …

Member Avatar for L7Sqr
0
47
Member Avatar for aFg3

Hi, I am writing my output using printf(...) procedure. Sometimes I would like to use bold font.like this [CODE]interface(.... turn bold on :-) .....) printf("something in bold\n"); interface(.... turn bold off :-) ....) printf("something not in bold\n"); Is any way to do this?[/CODE]

Member Avatar for cfajohnson
0
5K
Member Avatar for SakuraPink

Hi all, I am trying to write a shell script that submit a couple of jobs .Then in the "job.e.." files looks for the "Finished with all tasks." string and if it exits it continues to lets say step 3 submitting job3 and if not to step 4 and submitting …

Member Avatar for cfajohnson
0
130
Member Avatar for Azurit

Hi. In my bash script I have a loop which downloads a few files in the background with 'wget'. How can I make my script wait until all downloads are complete before it goes on? I guess I have to use the 'wait' command after the loop in some way? …

Member Avatar for ennoil
0
2K
Member Avatar for sachin27

Hi , I want to write following contents in a file through shell script. below is the content ------------------------------------------------------- DATE: Wed August 01 2:20 PST 2011 PRODUCT: Quick PRODUCT_VERSION:21.0 PROJECT: QW12 BUILD: 21.1.3.10 PATH: r:\\QW\21.1.3.10 -------------------------------------------------------- Where Build is variable . It should fetch the data from system(i.e. current version …

Member Avatar for ennoil
0
174
Member Avatar for noobrobot

Hi, I have situation where i need to automate transferring 10000+ files using sftp. while read line do if [ -d "$line" ]; then echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt fi done< files.txt sftp -b sftpCommand.txt stu@192.168.2.1 The above code executes each sftp command written to sftpCommand.txt. If some error occurs while …

Member Avatar for L7Sqr
0
165
Member Avatar for inthespotlite82

Hey guys- I'm trying to create a BASH script that will connect to a remote server, via SSH that requires a password, and then search a log file for the word error, store the output in a file, and then return the file to the local machine. I would like …

Member Avatar for masijade
0
756
Member Avatar for MaddTechwf

I have a batch file that uses the NET USE command to install some software. The location of the software requires a user to login. How can I ask the user for their username and password in the batch file and then use it in the NET USE string to …

0
55
Member Avatar for munitjsr2

consider a list of files in a particular directory(LIST A) 58623208 Sep 14 20:08 blbn_blfbe_drv 57904920 Sep 14 19:54 blbn_cycmn 55814208 Sep 14 06:02 clsa_Upd 38912000 Sep 14 19:12 cs_chgpp and in another directory (LIST B) 58623208 Sep 14 20:08 blbn_blfbe_drv 57904920 Sep 14 19:54 blbn_cycmn 55814208 Sep 14 06:02 …

Member Avatar for L7Sqr
0
213
Member Avatar for k2k

Say like I have hi() everywhere in a shell script and I would like to replace only a hi() to hi(20) right under the line "#modify only the hi() below this line". Is there anyway that I can locate the line "#modify only the hi() below this line" and then …

Member Avatar for anijacity
0
169
Member Avatar for etm9413

Hi, I am new to Unix/Linux... I have a TCSH shell script (on AIX4) in which, at a certain point, I want the user to be able to pass commands to the TCSH interpreter. What I do is I create the illusion that the user is at his usuall shell …

Member Avatar for etm9413
0
438
Member Avatar for manish250

Hi all, I am creating a Rpm .even i have built it.while i am calling my post install script it not prompting the user to enter the input while i am using the read command to take the input.I have read from google that we can't make the interactive RPM's …

0
87
Member Avatar for Proloe

Hello, So I'm attempting to do a bulk creation of users into Active Directory (Server 2008) using Powershell. I have a script but every time it runs it throws a exception error. I have tried to go through and find what is wrong, but I am having little luck. Any …

0
199
Member Avatar for SakuraPink

Hi all, I want to run a cpp code a couple of times using a shell. Cpp code needs a text file as an input. I have been trying to pass the file to the cpp code no success. The following is what I have done so far: [CODE]#! /bin/bash …

Member Avatar for SakuraPink
0
240
Member Avatar for aFg3

I want to search only in my files, contains only .txt and .c [CODE] This doesn't work for me ls | grep .txt | grep .c[/CODE] I want the ls and grep .txt, .c ??Thanks??

Member Avatar for L7Sqr
0
130
Member Avatar for aFg3

I want to create a simple file....with the command Example: [CODE]touch file.txt[/CODE] ok its created *BUT* ****I want to edit this file in shell and save it, writing EOF to finish. Any suggestions? How i do that? Thanks!

Member Avatar for JeoSaurus
0
65
Member Avatar for coding101

Is there some sort of script I can write that logs usernames every time someone (other than owner) "cd's into my pub directory"? any ideas? thanks

Member Avatar for thekashyap
0
156
Member Avatar for anna12

hey all, im new at shell scripting and need to find out a simple way to create text files, with random words in them. then needing to input 3 of these files arranging their lines in alphabetical order and after that creating an output file with the last lines sorted …

Member Avatar for eryxzs
1
11K
Member Avatar for D33wakar

Alright, here's the deal.There's a folder with Jpg images and I want to open each JPG image in that folder, rotate it clockwise once and save it with the same name in the same folder. How do I do that with batch programming? We Can't use "Windows Picture and Fax …

Member Avatar for D33wakar
0
133
Member Avatar for deni_bg

Hi, everybody! I have a big problem. I don't understand Unix, but I work as a system administrator, and sometimes I make some data exports and I have to delete old .dmp files, but today I had a mistake, I wrote rm * 909* This is a part of my …

Member Avatar for L7Sqr
0
163
Member Avatar for Staric

A friend of mine made this script to backup files from all my ubuntu boxes using lftp to an ftp server i setup on my local windows 7 machine using apache and abilityftp server. However it is only backing up some config files(see attached screen), none of the actual directories …

Member Avatar for JeoSaurus
0
231
Member Avatar for voidyman

Hi, I want to ftp a file to a location and then kickstart a process there to work on the file. I tried using !rexec but it does not seem to be working too well. I am not using the .netrc file(if that helps you understand my problems better) Thanks …

Member Avatar for voidyman
0
104

The End.