Creating matrix from folders and subfolders
Hello, Greetings! please help me produce the following solution. I need to produce one big matrix file from several files in different levels. If it helps, the index folder provides information on...
View ArticleUse one loop to handle below code
Code: mknod /dev/vda b 253 0 mknod /dev/vda1 b 253 1 mknod /dev/vda2 b 253 2 mknod /dev/vda3 b 253 3 I know below code is ease to handle, but I don't know above code Code: mknod /dev/vda1 b 253 1...
View ArticleWhere is wrong with my defualt value?
Code: lyang0@lyang0-OptiPlex-755:/tmp$ ./fg.sh ............................... ssh to the guest ..... ............................... ./fg.sh: 18: :ls: not found Code: lyang0@lyang0-OptiPlex-755:/tmp$...
View ArticleSetting Password For PDF File--Linux
Hi, I am in need of help. My requirements are : 1) To convert the existing files (irrespective of their format) in a directory to PDF format 2) To make the converted files password protected. I did the...
View ArticleBasic bash -- pulling files from an FTP server
Hi guys. Very new to this so apologies if this is ridiculously obvious, but I am not sure why this isn't working. I want to pull a file off an FTP server. I currently do it through windows, which is no...
View ArticleBasic bash, echo in loop for
Hi, I am trying to make a script to manage log. I want to write the name of the .gz I moved and the date : Code: for i in `ls $replog/*.gz` do echo " $i " `echo $i date...
View ArticleCURL Button Click Issue
I am trying to perform a button click via cURL and I am having an issue possibly due to java script on click. The HTML source code is: Code: <input...
View ArticleBash Scripting Help to automate replacing multiple lines
Background: I am writing a script to help me automate tweaks and things I apply to a custom Android rom I developed. I am on the very last part of my script, and I am stuck trying to find the right...
View ArticleMerging two text files side by side
Hi everyone, I need to merge two files side by side The files look something like this: Code: HOSTNAME fishtornado-K52F 127.0.1.1 UPTIME 20:17:01 up 2:19, 3 users, load average: 0.00, 0.04, 0.05...
View ArticleExpect scripting
Hello, I tried to use expect to catch information from my nagios and send me a call but i have nothing when i execute the script : Code: 0 - add : account SIP 1 - trext : information from nagios...
View ArticleMV option question
Hi, I have a question about mv --backup=numbered. This option add a numbre plus ~ at the end if the filee allready exist. I want to know if I can use this on : somthing.1.gz If the MV can do this thing...
View ArticleIf doesn't evaluate the first test
Good afternoon, I am tearing hair out over this. It should be so simple. I have an if statement to evaluate whether or not replication is working. I am testing variables from mysql to see if they are...
View ArticleHow to Log No Connect Error and then Exit using SFTP?
Solaris 10 9/10 BASH using the following code snippet: Code: sftp $TOHOST <<RESULT cd /inbound/ lcd /transfer put $i bye I want to...
View ArticleFind next line based on pattern, if it is similar pattern skip it
Hi, I am able to get next line if it is matching a particular pattern. But i need a way to skip if next line also matches same pattern.. For example: No Records No Records Records found got it Records...
View ArticleTesting for one word in a file
I am trying to test the output of a file. What I have so far is this: Code: if [[ `cat /tmp/filex` == "space - Compacted" ]]; then echo "yes";fi The problem with this is it works but I only want it to...
View ArticleHelp with manipulating environmental variables in UNIX
I am wondering if there is away to increment a date in c shell. What I need to do is basic, but I lack the knowledge. I have they following environmental variable in my job scripts Code: setenv YYYY...
View ArticleCombine rows from two files
I have two files, called "File A" and "File B". File A HTML Code: hdisk120: iprod_0000151 dprod_0000135 iprod_0000148 dprod_0000148 iprod_0000157 iprod_0000155 hdisk118: dprod_0000141 dprod_0000134...
View ArticleJoin all the lines matching similar pattern
I am trying to Join all the lines matching similar pattern. Example ; I wanted to join all the lines which has sam to a single line. In next line, i wanted to have all the lines with jones to a single...
View ArticleProblem with calculations
Code: Code: grep Quality abc.txt | awk -F"=" '{print $2}' o/p is given as 70/70 49/70 I want in the below format (percentage format) 100% 70% help me!!!!:confused::confused::confused:...
View ArticleSMART hdd errors
Hello, I receiving this error and failed raid 1 in a partiton. is this errors important? Thanks. Full SMART Status report: Code: smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8...
View Article