1,817 Topics

Member Avatar for
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
212
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
101
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
170
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
92
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
303
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
204
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
147
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
218
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
125
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
194
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
117
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
163
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
203
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
45
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
4K
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
127
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
172
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
161
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
750
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
54
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
210
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
166
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
436
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
196
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
236
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
129

The End.