I am trying to get some patches off of some solaris boxes but my ssh command line in this script is screwing up:
Code:
sh -n -o Batchmode=yes ${HOST} "uname -a ;ls -ltr /var/sadm/patch | grep -v 123456789-01">>${OUT_FILE};
Here is the full script:
Code:
#!/bin/ksh
#
################################################################################
#
# file: get_patch_so
I have a little project to build bash script that search in the OS ( Linux/Solaris ) the current IP address from files and replace them with other IP address.
The problem is that IP address could be in text file or in not text file as binary/data files, etc.
I use the command:
file –mime $PATH ( --mime is valid only for Linux )
In order to verify if file is text file, or not text file ( as bi
I have developed a small script to remove the Control M characters that get embedded when we move any file from Windows to Unix. For some reason, its not working in all scenarios. Some times I still see the ^M not being removed. Is there anything missing in the script:
Code:
cd ${inputDir}
lCountFixed=0
lCountAll=$(find .
Hi All,
I need to remove control m character from a file.
Steps which i am doing in shell script are:
1) We are comparing the header of the file to the database table header
Here the file header has control-m characters. How do i remove it.
Please help.
Hi,
I'm having a general query. If we do cat <file name> on a Ebcidic format file then many unknown characters are displayed in my screen.
Can we change the character set related to EBCIDIC in session level and apply the cat command on a EBCIDIC file?
Hello.
Could anyone help me with my little annoying problem?
I have to generate a 512 MB file made up with random data using DD. After some internet digging I found out that the command is:
Code:
dd if=/dev/urandom of=/exemple/file bs=512MB
After running this command the shell is not responding anymore, so I have to hit ctrl + z to end the process.
Dear all,
I got a flat file (test.txt) generated in solaris unix box attached .
I have a text file in which I have something like this-
10.2.57.44 56538154 3028
120.149.20.197 28909678 3166
10.90.158.161 869126135 6025
In that text file, I have around 1,000,000 rows exactly as above. I am working in SunOS environment. I needed a way to remove everything from that text file leaving only IP Address (first column in the above text file is IP Address).
Hi All,
How do i remove continuos blank lines from a file.
I have a file with data:
Code:
abc;
def;
ghi;
jkl;
mno;
pqr;
In the above file, there are two blank lines. I want to remove, one out of them.
My output should look like:
Code:
abc;
def;
ghi;
jkl;
mno;
pqr;
With the below command, all the blank lines are getting deleted. I don't want that.