Search Results

Search: Posts Made By: knight_eon
2,065
Posted By knight_eon
And lil bit more change: awk -F'"' '{print...
And lil bit more change:

awk -F'"' '{print "project " $2, $6?$6:$4}' myfile.txt
1,573
Posted By knight_eon
Try: #!/bin/ksh FS[1]="\/$" awk...
Try:


#!/bin/ksh
FS[1]="\/$"
awk '/'"${FS[1]}"'/ {print $(NF-1)+0}' df.tmp
7,922
Posted By knight_eon
It can be written in sed one liner. Here is how: ...
It can be written in sed one liner. Here is how:


$ cat data
Knight Eon
Hello WORLD
Hello Earth
LINE
How is everyone
$ sed -e 's/\(\L.*\)/\1]Foo/g' data
Knight Eon
Hello WORLD]Foo
Hello...
7,922
Posted By knight_eon
Try something like this: I will add Eon at the...
Try something like this:
I will add Eon at the end of the line

$ cat data
Knight Eon
Hello World
Hello Earth
How is everyone

$ sed -e '$s/\(.*\)/\1Eon/g' data
Knight Eon
Hello World...
4,491
Posted By knight_eon
You can do like this for the Destination...
You can do like this for the Destination Directory:


#!/bin/bash

OLD_HIST_DIR="/var/log/user_history/old_logs"
HIST_DIR="/var/log/user_history"
...
2,873
Posted By knight_eon
Please try this: let MSTNUM=$(echo...
Please try this:


let MSTNUM=$(echo masterCSF242323.img | sed -e 's/[^0-9]*//g')
let IDNUM=$(echo indexCSF242323.img | sed -e 's/[^0-9]*//g')

if [[ ${MSTNUM} -eq ${IDNUM} ]]; then
...
3,412
Posted By knight_eon
awk -F '=' ' { for...
awk -F '=' '
{
for (i=1; i<=NF; i++) {
a[NR,i] = $i
}
}
NF>p { p = NF }
END {
for(j=1;...
2,851
Posted By knight_eon
Try this: [[ Assumption : basename of the...
Try this:

[[ Assumption : basename of the file will remain the same. Only the sequence number will change ]]


for i in ' ' $(seq 1 99); do # Please include ' ' as...
4,514
Posted By knight_eon
You can check this code :) #!/bin/bash ...
You can check this code :)


#!/bin/bash

while read MSISDN; do
awk -F'|' '/^'"$MSISDN"'/ {print $0}' source.txt >> output

done < msidsn.txt
25,177
Posted By knight_eon
He is looking for Tab Space and not Blank...
He is looking for Tab Space and not Blank Space... hence


sed -e 's/|/\t/g' inputfile > outputfile
2,230
Posted By knight_eon
Lets say, you have some set of files ending with...
Lets say, you have some set of files ending with .dat and u want to create the Trailer like T|$(count-1)

So,


for fn in *.dat
do
awk 'END{print "T| " NR-1}' ${fn} >> ${fn}
done
924
Posted By knight_eon
$ cat cnamegenerate.sh if [[ ! -z ${1} ]];...
$ cat cnamegenerate.sh

if [[ ! -z ${1} ]]; then
IP_ADDRESS="${1}"
else
echo -e "Usage:\n\t${0} <IP_ADDRESS>"
exit 1
fi

echo ${IP_ADDRESS}



For the PHP

<?php...
6,169
Posted By knight_eon
#!/bin/bash HERE=`uname -n` #...
#!/bin/bash


HERE=`uname -n` # Stores the node name of the host server

THERE=<SERVER WHERE YOU WANT TO KEEP THE BACKUP> #Server on which you want to store the backup

...
Showing results 1 to 13 of 13

 
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy